-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ldap): fix helm templating and add unit tests
- Loading branch information
1 parent
098f530
commit 2ccf53e
Showing
4 changed files
with
71 additions
and
1 deletion.
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
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,22 @@ | ||
suite: Test with custom values | ||
templates: | ||
- secret.yaml | ||
tests: | ||
- it: should create a Secret with the correct value | ||
set: | ||
ldap: | ||
storage: | ||
accountname: name | ||
accountkey: key | ||
template: secret.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: Secret | ||
- equal: | ||
path: data.azurestorageaccountname | ||
value: bmFtZQ== | ||
- equal: | ||
path: data.azurestorageaccountkey | ||
value: a2V5 |
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,45 @@ | ||
suite: Test with default values | ||
templates: | ||
- certificate.yaml | ||
- persistentVolumeClaim.yaml | ||
tests: | ||
- it: should create a certificate for the dns ldap.jenkins.io | ||
template: certificate.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- contains: | ||
path: spec.dnsNames | ||
content: | ||
ldap.jenkins.io | ||
- isKind: | ||
of: Certificate | ||
- it: should create 2 PVC, one for data, one for backup | ||
template: persistentVolumeClaim.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 2 | ||
- isKind: | ||
of: PersistentVolumeClaim | ||
documentIndex: 0 | ||
- isKind: | ||
of: PersistentVolumeClaim | ||
documentIndex: 1 | ||
- it: should create 1 PVC for backup | ||
template: persistentVolumeClaim.yaml | ||
asserts: | ||
- equal: | ||
path: spec.selector.matchLabels.role | ||
value: ldap-backup | ||
documentIndex: 0 | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ldap-backup | ||
documentIndex: 0 | ||
- it: should create 1 PVC for data | ||
template: persistentVolumeClaim.yaml | ||
asserts: | ||
- equal: | ||
path: metadata.name | ||
value: RELEASE-NAME-ldap-data | ||
documentIndex: 1 |
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