Skip to content

Commit

Permalink
Add homeStorage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jforest committed Nov 22, 2024
1 parent d7442ff commit 0410625
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions ci/rstudio-workbench/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,67 @@ tests:
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-shared-storage")].persistentVolumeClaim.claimName'
value: "RELEASE-NAME-rstudio-workbench-shared-storage"
- it: should specify a volumeMount and a volume for homeStorage if homeStorage.create is true
template: deployment.yaml
set:
homeStorage:
create: true
path: "/mnt/shared"
asserts:
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].mountPath'
value: "/mnt/shared"
- notExists:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].subPath'
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-home-storage")].persistentVolumeClaim.claimName'
value: "RELEASE-NAME-rstudio-workbench-home-storage"
- it: should specify a volumeMount and a volume for homeStorage if homeStorage.mount is true
template: deployment.yaml
set:
homeStorage:
mount: true
path: "/mnt/shared"
asserts:
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].mountPath'
value: "/mnt/shared"
- notExists:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].subPath'
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-home-storage")].persistentVolumeClaim.claimName'
value: "RELEASE-NAME-rstudio-workbench-home-storage"
- it: should specify a volumeMount and a volume for homeStorage if homeStorage.create is true
template: deployment.yaml
set:
homeStorage:
create: true
path: "/mnt/shared"
subPath: "subpath"
asserts:
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].mountPath'
value: "/mnt/shared"
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].subPath'
value: "subpath"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-home-storage")].persistentVolumeClaim.claimName'
value: "RELEASE-NAME-rstudio-workbench-home-storage"
- it: should specify a volumeMount and a volume for homeStorage if homeStorage.mount is true
template: deployment.yaml
set:
homeStorage:
mount: true
path: "/mnt/shared"
subPath: "subpath"
asserts:
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].mountPath'
value: "/mnt/shared"
- equal:
path: 'spec.template.spec.containers[0].volumeMounts[?(@.name=="rstudio-home-storage")].subPath'
value: "subpath"
- equal:
path: 'spec.template.spec.volumes[?(@.name=="rstudio-home-storage")].persistentVolumeClaim.claimName'
value: "RELEASE-NAME-rstudio-workbench-home-storage"

0 comments on commit 0410625

Please sign in to comment.