-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct serviceAccount format (#25)
- Loading branch information
Showing
8 changed files
with
150 additions
and
136 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
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
12 changes: 0 additions & 12 deletions
12
snyk-universal-broker/tests/__snapshot__/serviceaccount_test.yaml.snap
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,40 +1,46 @@ | ||
# tests/service_account_test.yaml | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json | ||
suite: Service Account configurations | ||
templates: | ||
- templates/statefulset.yaml | ||
- templates/serviceaccount.yaml | ||
- statefulset.yaml | ||
- serviceaccount.yaml | ||
values: | ||
- ../values.yaml | ||
- fixtures/default_values.yaml | ||
|
||
tests: | ||
- it: can enable the service account with a custom name | ||
templates: | ||
- templates/serviceaccount.yaml | ||
- serviceaccount.yaml | ||
set: | ||
serviceaccount: | ||
serviceAccount: | ||
create: true | ||
name: "custom-service-account" | ||
asserts: | ||
- matchSnapshot: {} | ||
- equal: | ||
path: metadata.name | ||
value: custom-service-account | ||
|
||
- it: can use an existing service account | ||
set: | ||
serviceaccount: | ||
serviceAccount: | ||
create: false | ||
existingName: "existing-service-account" | ||
templates: | ||
- templates/statefulset.yaml | ||
- statefulset.yaml | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.serviceaccountName | ||
path: spec.template.spec.serviceAccountName | ||
value: existing-service-account | ||
|
||
- it: prioritizes existing service account when both create and existingName are set | ||
set: | ||
serviceaccount: | ||
serviceAccount: | ||
create: true | ||
existingName: "existing-service-account" | ||
name: "" | ||
templates: | ||
- templates/statefulset.yaml | ||
- statefulset.yaml | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.serviceaccountName | ||
value: existing-service-account | ||
path: spec.template.spec.serviceAccountName | ||
value: existing-service-account |
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