helm-gitea/unittests/helm/dependency-checks/customization-integrity-redis.yaml
justusbunsi 4691b63f7a Move Helm unittests into subfolder (#750)
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/750
Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Co-committed-by: justusbunsi <sk.bunsenbrenner@gmail.com>
2024-12-18 12:04:15 +00:00

53 lines
1.5 KiB
YAML

suite: Dependency checks | Customization integrity | redis
release:
name: gitea-unittests
namespace: testing
set:
redis-cluster:
enabled: false
redis:
enabled: true
architecture: standalone
global:
redis:
password: gitea-password
master:
count: 2
tests:
- it: "[redis] configures correct 'master' nodes"
template: charts/redis/templates/master/application.yaml
asserts:
- documentIndex: 0
equal:
path: spec.replicas
value: 2
- it: "[redis] redis.global.redis.password is applied as expected"
template: charts/redis/templates/secret.yaml
asserts:
- documentIndex: 0
equal:
path: data["redis-password"]
value: "Z2l0ZWEtcGFzc3dvcmQ="
- it: "[redis] renders the referenced service"
template: charts/redis/templates/headless-svc.yaml
asserts:
- containsDocument:
kind: Service
apiVersion: v1
name: gitea-unittests-redis-headless
namespace: testing
- documentIndex: 0
contains:
path: spec.ports
content:
name: tcp-redis
port: 6379
targetPort: redis
- it: "[gitea] waits for redis to be up and running"
template: templates/gitea/init.yaml
asserts:
- documentIndex: 0
matchRegex:
path: stringData["configure_gitea.sh"]
pattern: nc -vz -w2 gitea-unittests-redis-headless.testing.svc.cluster.local 6379