diff --git a/charts/reports/tests/custom_values_test.yaml b/charts/reports/tests/custom_values_test.yaml index a924a5829..a53734058 100644 --- a/charts/reports/tests/custom_values_test.yaml +++ b/charts/reports/tests/custom_values_test.yaml @@ -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"