Skip to content

Commit

Permalink
Add userProvisioning and startupUserProvisioning tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jforest committed Nov 22, 2024
1 parent fc81d66 commit 8a5a6f2
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions ci/rstudio-workbench/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,74 @@ tests:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-session-secret")]'
- notExists:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-session-secret")]'
- it: should specify a volumeMount and a volume for userProvisioning if config.userProvisioning is defined and not empty
template: deployment.yaml
set:
config:
defaultMode:
userProvisioning: 0600
userProvisioning:
sssd.conf:
dsn: "test"
driver: "test"
asserts:
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-user")].mountPath'
value: "/etc/sssd/conf.d/"
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-user")].name'
value: "rstudio-user"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user")].name'
value: "rstudio-user"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user")].secret.secretName'
value: "RELEASE-NAME-rstudio-workbench-user"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user")].secret.defaultMode'
value: 0600
- it: should not specify a volumeMount and a volume for userProvisioning if config.userProvisioning is not defined
template: deployment.yaml
asserts:
- notExists:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-user")]'
- notExists:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user")]'
- it: should specify a volumeMount and a volume for startupUserProvisioning if config.startupUserProvisioning is defined and not empty
template: deployment.yaml
set:
config:
defaultMode:
startup: 0600
startupUserProvisioning:
sssd.conf:
dsn: "test"
driver: "test"
asserts:
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-user-startup")].mountPath'
value: "/startup/user-provisioning"
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-user-startup")].name'
value: "rstudio-user-startup"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user-startup")].name'
value: "rstudio-user-startup"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user-startup")].configMap.name'
value: "RELEASE-NAME-rstudio-workbench-start-user"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user-startup")].configMap.defaultMode'
value: 0600
- it: should not specify a volumeMount and a volume for startupUserProvisioning if config.startupUserProvisioning is not defined
template: deployment.yaml
set:
config:
defaultMode:
startup: 0600
startupUserProvisioning: null
asserts:
- notExists:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-user-startup")]'
- notExists:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-user-startup")]'

0 comments on commit 8a5a6f2

Please sign in to comment.