blob: ef0565d6c09f593d4e5914c7282b724433c003de [file] [log] [blame]
---
suite: test secret behavior
templates:
- secret.yaml
tests:
- it: "should render with default values"
asserts:
- isKind:
of: Secret
- equal:
path: metadata.name
value: RELEASE-NAME-mariadb-init
- equal:
path: metadata.namespace
value: NAMESPACE
- matchRegex:
path: metadata.labels.app
pattern: mariadb-init-config-job
- equal:
path: data.db-user-password
value: Q2lAc2hzT2QzcGt5MVZqaQ==
- it: "should render specific password value base64 encoded"
set:
config:
userPassword: yolo
asserts:
- equal:
path: data.db-user-password
value: eW9sbw==
- it: "shoud render with other databases"
set:
config:
mysqlAdditionalDatabases:
dbOne:
user: one
password: pwd1
dbTwo:
user: two
password: pwd2
asserts:
- equal:
path: data.db-user-password
value: Q2lAc2hzT2QzcGt5MVZqaQ==
- equal:
path: data.db-dbOne-user-password
value: cHdkMQ==
- equal:
path: data.db-dbTwo-user-password
value: cHdkMg==