Skip to content

Commit

Permalink
A couple of more tests for the ingress template. Better explanation f…
Browse files Browse the repository at this point in the history
…or a couple of promettheus tests
  • Loading branch information
jforest committed Nov 19, 2024
1 parent fa543d6 commit fa96405
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions ci/rstudio-workbench/tests/ingress_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ tests:
asserts:
- notExists:
path: "spec.tls"
- it: should include the tls path if tls has values specified and ingress is enabled
template: ingress.yaml
set:
ingress:
enabled: true
tls:
- secretName: chart-example-tls
hosts:
- chart-example.local
asserts:
- exists:
path: "spec.tls"
- it: should include the ingressClassName if defined and ingress is enabled
template: ingress.yaml
set:
Expand All @@ -36,3 +48,11 @@ tests:
- equal:
path: "spec.ingressClassName"
value: "alb"
- it: should not include the ingressClassName if it is not defined and ingress is enabled
template: ingress.yaml
set:
ingress:
enabled: true
asserts:
- notExists:
path: "spec.ingressClassName"
4 changes: 2 additions & 2 deletions ci/rstudio-workbench/tests/prometheus_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ templates:
- deployment.yaml
- svc.yaml
tests:
- it: should ensure the specified metrics port is used in the service
- it: should ensure the specified metrics port is used in the service if prometheus is enabled and legacy is not true
template: svc.yaml
set:
prometheus:
Expand All @@ -21,7 +21,7 @@ tests:
- equal:
path: "spec.ports[1].port"
value: 8989
- it: should ensure the legacy metrics port is used in the service
- it: should ensure the legacy metrics port is used in the service if prometheus is enabled and legacy is true
template: svc.yaml
set:
prometheus:
Expand Down

0 comments on commit fa96405

Please sign in to comment.