Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start experimenting with helm unittesting #611

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Include some basic tests to verify the serverAccount name is being se…
…t as we expect
  • Loading branch information
jforest committed Nov 14, 2024
commit 3e8ba5ff563aa527108126496dd2bcfb93b467aa
54 changes: 54 additions & 0 deletions charts/rstudio-workbench/tests/service_accounts_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
suite: Workbench Service Accounts
templates:
- configmap-general.yaml
- configmap-prestart.yaml
- configmap-secret.yaml
- configmap-session.yaml
- deployment.yaml
tests:
- it: should set the Workbench pod service account when the launcher is enabled
template: deployment.yaml
set:
launcher:
enabled: true
rbac:
serviceAccount:
name: "workbench-service-account"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "workbench-service-account"
- it: should set the Workbench pod service account when the launcher is not enabled
template: deployment.yaml
set:
launcher:
enabled: false
rbac:
serviceAccount:
name: "workbench-service-account"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "workbench-service-account"
- it: should use the default serviceAccount name when not set
template: deployment.yaml
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "RELEASE-NAME-rstudio-workbench"
- it: should use the nameOverride as part of the serviceAccount name when nameOverride is set
template: deployment.yaml
set:
nameOverride: "posit-workbench"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "RELEASE-NAME-posit-workbench"
- it: should use the fullnameOverride as the serviceAccount name when fullnameOverride is set
template: deployment.yaml
set:
fullnameOverride: "posit-workbench"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "posit-workbench"