123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- suite: pod ixVolume volume test
- templates:
- - common.yaml
- tests:
- - it: should pass with ixVolume volume
- set:
- workload:
- workload-name1:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- ixVolumes:
- - hostPath: /mnt/pool/ix-applications/ix-app
- persistence:
- ix-vol:
- enabled: true
- type: ixVolume
- datasetName: ix-app
- asserts:
- - documentIndex: &deploymentDoc 0
- isKind:
- of: Deployment
- - documentIndex: *deploymentDoc
- contains:
- path: spec.template.spec.volumes
- content:
- name: ix-vol
- hostPath:
- path: /mnt/pool/ix-applications/ix-app
- - it: should pass with multiple ixVolume volumes
- set:
- workload:
- workload-name1:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- ixVolumes:
- - hostPath: /mnt/pool/ix-applications/ix-app1
- - hostPath: /mnt/pool/ix-applications/ix-app2
- persistence:
- ix-vol1:
- enabled: true
- type: ixVolume
- datasetName: ix-app1
- ix-vol2:
- enabled: true
- type: ixVolume
- datasetName: ix-app2
- asserts:
- - documentIndex: &deploymentDoc 0
- isKind:
- of: Deployment
- - documentIndex: *deploymentDoc
- contains:
- path: spec.template.spec.volumes
- content:
- name: ix-vol1
- hostPath:
- path: /mnt/pool/ix-applications/ix-app1
- - documentIndex: *deploymentDoc
- contains:
- path: spec.template.spec.volumes
- content:
- name: ix-vol2
- hostPath:
- path: /mnt/pool/ix-applications/ix-app2
- - it: should pass with ixVolume and hostPathType
- set:
- some_dataset: ix-app
- some_type: DirectoryOrCreate
- workload:
- workload-name1:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- ixVolumes:
- - hostPath: /mnt/pool/ix-applications/ix-app
- persistence:
- ix-vol:
- enabled: true
- type: ixVolume
- datasetName: "{{ .Values.some_dataset }}"
- hostPathType: "{{ .Values.some_type }}"
- asserts:
- - documentIndex: *deploymentDoc
- isKind:
- of: Deployment
- - documentIndex: *deploymentDoc
- contains:
- path: spec.template.spec.volumes
- content:
- name: ix-vol
- hostPath:
- path: /mnt/pool/ix-applications/ix-app
- type: DirectoryOrCreate
- # Failures
- - it: should fail without datasetName
- set:
- workload:
- some-workload:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- persistence:
- volume1:
- enabled: true
- type: ixVolume
- datasetname: ""
- asserts:
- - failedTemplate:
- errorMessage: Persistence - Expected non-empty <datasetName> on <ixVolume> type
- - it: should fail with empty ixVolumes
- set:
- workload:
- some-workload:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- ixVolumes: []
- persistence:
- volume1:
- enabled: true
- type: ixVolume
- datasetName: ix-app
- asserts:
- - failedTemplate:
- errorMessage: Persistence - Expected non-empty <ixVolumes> in values on <ixVolume> type
- - it: should fail with wrong ixVolumes
- set:
- workload:
- some-workload:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- ixVolumes:
- - hostPath: /mnt/pool/ix-applications/ix-wrong-app
- - hostPath: /mnt/pool/ix-applications/ix-other-app
- persistence:
- volume1:
- enabled: true
- type: ixVolume
- datasetName: ix-app
- asserts:
- - failedTemplate:
- errorMessage: Persistence - Expected <datasetName> [ix-app] to exist on <ixVolumes> list, but list contained [ix-wrong-app, ix-other-app] on <ixVolume> type
- - it: should fail with invalid hostPathType
- set:
- workload:
- some-workload:
- enabled: true
- primary: true
- type: Deployment
- podSpec: {}
- ixVolumes:
- - hostPath: /mnt/pool/ix-applications/ix-app
- persistence:
- volume1:
- enabled: true
- type: ixVolume
- datasetName: ix-app
- hostPathType: invalid
- asserts:
- - failedTemplate:
- errorMessage: Persistence - Expected <hostPathType> to be one of [DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice, BlockDevice], but got [invalid]
|