mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 13:26:21 -03:00
75 lines
1.8 KiB
YAML
75 lines
1.8 KiB
YAML
suite: statefulset strategy test
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: should pass with strategy changed in StatefulSet
|
|
documentIndex: &statefulsetDoc 0
|
|
set:
|
|
controller:
|
|
type: StatefulSet
|
|
strategy: OnDelete
|
|
rollingUpdate:
|
|
partition: 5
|
|
unavailable: 6
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 3
|
|
- isKind:
|
|
of: StatefulSet
|
|
- equal:
|
|
path: spec.updateStrategy
|
|
value:
|
|
type: OnDelete
|
|
- isNull:
|
|
path: spec.updateStrategy.rollingUpdate
|
|
|
|
- it: should pass with strategy changed in StatefulSet
|
|
documentIndex: *statefulsetDoc
|
|
set:
|
|
controller:
|
|
type: StatefulSet
|
|
strategy: RollingUpdate
|
|
rollingUpdate:
|
|
partition: 5
|
|
unavailable: 6
|
|
asserts:
|
|
- equal:
|
|
path: spec.updateStrategy
|
|
value:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
partition: 5
|
|
maxUnavailable: 6
|
|
|
|
- it: should fail with wrong strategy
|
|
documentIndex: *statefulsetDoc
|
|
set:
|
|
controller:
|
|
type: StatefulSet
|
|
strategy: not_valid_strategy
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Not a valid strategy type for StatefulSet (not_valid_strategy)
|
|
|
|
- it: should pass with revisionHistoryLimit changed
|
|
documentIndex: *statefulsetDoc
|
|
set:
|
|
controller:
|
|
type: StatefulSet
|
|
revisionHistoryLimit: 1
|
|
asserts:
|
|
- equal:
|
|
path: spec.revisionHistoryLimit
|
|
value: 1
|
|
|
|
- it: should pass with replicas changed
|
|
documentIndex: *statefulsetDoc
|
|
set:
|
|
controller:
|
|
type: StatefulSet
|
|
replicas: 6
|
|
asserts:
|
|
- equal:
|
|
path: spec.replicas
|
|
value: 6
|