Skip to content
Snippets Groups Projects
Commit bca95c1f authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5238 Set values in deployment test

parent feca2410
Branches
Tags
No related merge requests found
......@@ -30,6 +30,11 @@ templates:
- templates/deployment.yaml
tests:
- it: should have a volume for the mongodb certificate
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- contains:
path: spec.template.spec.volumes
......@@ -39,6 +44,11 @@ tests:
secretName: ozg-mongodb-tls-cert
optional: true
- it: should mount mongodb certificate volume
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
......@@ -49,6 +59,10 @@ tests:
readOnly: true
- it: should configure internal mongodb if not useExternal
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
database.useExternal: false
asserts:
- contains:
......@@ -67,10 +81,14 @@ tests:
value: administration-database
- it: should configure external mongodb if useExternal
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
database.useExternal: true
asserts:
- contains:
path: spec.template.spec.containers[0].envFrom
content:
secretRef:
name: administration-database-spring
\ No newline at end of file
name: administration-database-spring
......@@ -29,6 +29,11 @@ release:
namespace: helm-test
tests:
- it: should use default image pull secret
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- contains:
path: spec.template.spec.imagePullSecrets
......@@ -36,9 +41,13 @@ tests:
name: administration-image-pull-secret
- it: should use customizable image pull secret
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
imagePullSecret: custom-image-pull-secret
asserts:
- contains:
path: spec.template.spec.imagePullSecrets
content:
name: custom-image-pull-secret
\ No newline at end of file
name: custom-image-pull-secret
......@@ -30,8 +30,12 @@ release:
tests:
- it: should have customizable resources
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
resources: { "test": 1 }
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value: { "test": 1 }
\ No newline at end of file
value: { "test": 1 }
......@@ -31,6 +31,10 @@ templates:
tests:
- it: should override the spring profiles
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
env.overrideSpringProfiles: oc,dev,ea
asserts:
- isKind:
......@@ -41,6 +45,11 @@ tests:
name: spring_profiles_active
value: oc,dev,ea
- it: should generate the spring profiles
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- isKind:
of: Deployment
......@@ -48,4 +57,4 @@ tests:
path: spec.template.spec.containers[0].env
content:
name: spring_profiles_active
value: oc, dev
\ No newline at end of file
value: oc, dev
......@@ -31,6 +31,11 @@ set:
ozgcloud.environment: "default"
tests:
- it: should have metadata values
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- isKind:
of: Deployment
......@@ -43,6 +48,11 @@ tests:
- exists:
path: metadata.labels
- it: should have correct general settings
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- equal:
path: spec.progressDeadlineSeconds
......@@ -71,6 +81,11 @@ tests:
path: spec.strategy.type
value: "RollingUpdate"
- it: should have correct template configuration
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/instance"]
......@@ -110,6 +125,11 @@ tests:
path: spec.template.spec.terminationGracePeriodSeconds
value: 300000000
- it: should have correct container configuration
set:
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
asserts:
- equal:
path: spec.template.spec.containers[0].name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment