Skip to content

Commit

Permalink
add custom test values for pdb
Browse files Browse the repository at this point in the history
  • Loading branch information
smerle33 committed Oct 3, 2023
1 parent f2a6349 commit 9b8bb2d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion charts/reports/tests/custom_values_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,34 @@ tests:
- equal:
path: spec.template.spec.volumes[0].hostPath
value: /host
- it: should create a PDB with defaults when multiple replicas are set
template: pdb.yaml
set:
replicaCount: 2
asserts:
- isKind:
of: PodDisruptionBudget
- equal:
path: spec.minAvailable
value: 1
- equal:
path: spec.selector.matchLabels['app.kubernetes.io/name']
value: "reports"
- it: should ensure the pdb has correct spec
template: pdb.yaml
set:
replicaCount: 2
poddisruptionbudget.minAvailable: 2
poddisruptionbudget.maxUnavailable: 1
poddisruptionbudget.maxUnavailable: 3
asserts:
- isKind:
of: PodDisruptionBudget
- equal:
path: spec.minAvailable
value: 2
- equal:
path: spec.maxUnavailable
value: 3
- equal:
path: spec.selector.matchLabels['app.kubernetes.io/name']
value: "reports"

0 comments on commit 9b8bb2d

Please sign in to comment.