Files
chart/library/common-test/tests/persistence/pv_name_test.yaml

71 lines
1.9 KiB
YAML

suite: pv name test
templates:
- common.yaml
tests:
- it: should generate correct name
set:
persistence:
my-volume1:
enabled: true
type: nfs-pv-pvc
server: my-server
share: /some/path
my-volume2:
enabled: true
type: smb-pv-pvc
server: my-server
share: some/path
username: my-user
password: my-password
asserts:
- documentIndex: &pvDoc 0
isKind:
of: PersistentVolume
- documentIndex: *pvDoc
isAPIVersion:
of: v1
- documentIndex: *pvDoc
equal:
path: metadata.name
value: release-name-common-test-my-volume1-1740507301
- documentIndex: &pvcDoc 1
isKind:
of: PersistentVolumeClaim
- documentIndex: *pvcDoc
isAPIVersion:
of: v1
- documentIndex: *pvcDoc
equal:
path: metadata.name
value: release-name-common-test-my-volume1-1740507301
- documentIndex: &secretDoc 2
isKind:
of: Secret
- documentIndex: *secretDoc
isAPIVersion:
of: v1
- documentIndex: *secretDoc
equal:
path: metadata.name
value: release-name-common-test-my-volume2-1627523190
- documentIndex: &pvDoc 3
isKind:
of: PersistentVolume
- documentIndex: *pvDoc
isAPIVersion:
of: v1
- documentIndex: *pvDoc
equal:
path: metadata.name
value: release-name-common-test-my-volume2-1627523190
- documentIndex: &otherPvcDoc 4
isKind:
of: PersistentVolumeClaim
- documentIndex: *otherPvcDoc
isAPIVersion:
of: v1
- documentIndex: *otherPvcDoc
equal:
path: metadata.name
value: release-name-common-test-my-volume2-1627523190