Merge "Revert "basic auth for so-monitoring""
[oom.git] / kubernetes / common / mariadb-init / tests / secret_test.yaml
1 ---
2 suite: test secret behavior
3 templates:
4   - secret.yaml
5 tests:
6   - it: "should render with default values"
7     asserts:
8       - isKind:
9           of: Secret
10       - equal:
11           path: metadata.name
12           value: RELEASE-NAME-mariadb-init
13       - equal:
14           path: metadata.namespace
15           value: NAMESPACE
16       - matchRegex:
17           path: metadata.labels.app
18           pattern: mariadb-init-config-job
19       - equal:
20           path: data.db-user-password
21           value: Q2lAc2hzT2QzcGt5MVZqaQ==
22   - it: "should render specific password value base64 encoded"
23     set:
24       config:
25         userPassword: yolo
26     asserts:
27       - equal:
28           path: data.db-user-password
29           value: eW9sbw==
30   - it: "shoud render with other databases"
31     set:
32       config:
33         mysqlAdditionalDatabases:
34           dbOne:
35             user: one
36             password: pwd1
37           dbTwo:
38             user: two
39             password: pwd2
40     asserts:
41       - equal:
42           path: data.db-user-password
43           value: Q2lAc2hzT2QzcGt5MVZqaQ==
44       - equal:
45           path: data.db-dbOne-user-password
46           value: cHdkMQ==
47       - equal:
48           path: data.db-dbTwo-user-password
49           value: cHdkMg==