Skip to content

Commit

Permalink
Add tests for when we set RSW_LOAD_BALANCING
Browse files Browse the repository at this point in the history
  • Loading branch information
jforest committed Nov 21, 2024
1 parent de893f2 commit b96c7a3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ci/rstudio-workbench/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,28 @@ tests:
path: 'spec.template.spec.containers[0].env[?(@.name=="RSW_TESTUSER_PASSWD")]'
- notExists:
path: 'spec.template.spec.containers[0].env[?(@.name=="RSW_TESTUSER_UID")]'
- it: should set the RSW_LOAD_BALANCING env var to true if replicas > 1
template: deployment.yaml
set:
replicas: 2
asserts:
- equal:
path: 'spec.template.spec.containers[0].env[?(@.name=="RSW_LOAD_BALANCING")].value'
value: "true"
- it: should not set the RSW_LOAD_BALANCING env var replicas = 1
template: deployment.yaml
set:
replicas: 1
asserts:
- notExists:
path: 'spec.template.spec.containers[0].env[?(@.name=="RSW_LOAD_BALANCING")]'
- it: should set the RSW_LOAD_BALANCING env var to true if loadBalancer.forceEnabled is true even if replicas = 1
template: deployment.yaml
set:
replicas: 1
loadBalancer:
forceEnabled: true
asserts:
- equal:
path: 'spec.template.spec.containers[0].env[?(@.name=="RSW_LOAD_BALANCING")].value'
value: "true"

0 comments on commit b96c7a3

Please sign in to comment.