aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-init/tests/secret_test.yaml
blob: ef0565d6c09f593d4e5914c7282b724433c003de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
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==