-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add secrets_test.yaml for testing secret object creation
- Loading branch information
1 parent
302312a
commit c83a963
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
suite: test secrets object | ||
templates: | ||
- secrets.yaml | ||
tests: | ||
- it: should create a secret object | ||
set: | ||
forge.domain: "chart-unit-tests.com" | ||
forge.email.smtp: | ||
host: smtp.gmail.com | ||
password: ut-smtp-password | ||
postgresql.auth: | ||
username: ut-db-username | ||
password: ut-db-password | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: Secret | ||
- it: should create a secret object with smtp password only | ||
set: | ||
forge.domain: "chart-unit-tests.com" | ||
postgresql.auth.existingSecret: "fake-existing-db-secret" | ||
forge.email.smtp: | ||
host: smtp.gmail.com | ||
password: fakePassword | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: Secret | ||
- isNotNullOrEmpty: | ||
path: data.smtp-password | ||
- notExists: | ||
path: data.password | ||
- it: should create a secret object with database password only | ||
set: | ||
forge.domain: "chart-unit-tests.com" | ||
postgresql.auth: | ||
username: ut-db-username | ||
password: ut-db-password | ||
forge.email.smtp: | ||
host: smtp.gmail.com | ||
existingSecret: "fake-existing-smtp-secret" | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: Secret | ||
- isNotNullOrEmpty: | ||
path: data.password | ||
- isNotNullOrEmpty: | ||
path: data.postgres-password | ||
- notExists: | ||
path: data.smtp-password | ||
- it: should not create the secret if both external ones are used | ||
set: | ||
forge.domain: "chart-unit-tests.com" | ||
postgresql.auth.existingSecret: "fake-existing-db-secret" | ||
forge.email.smtp: | ||
host: smtp.gmail.com | ||
existingSecret: "fake-existing-smtp-secret" | ||
asserts: | ||
- hasDocuments: | ||
count: 0 |