pvc_name_test.yaml 844 B

12345678910111213141516171819202122232425262728293031323334
  1. suite: pvc name test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should generate correct name
  6. set:
  7. persistence:
  8. my-volume1:
  9. enabled: true
  10. type: pvc
  11. my-volume2:
  12. enabled: true
  13. type: pvc
  14. asserts:
  15. - documentIndex: &pvcDoc 0
  16. isKind:
  17. of: PersistentVolumeClaim
  18. - documentIndex: *pvcDoc
  19. isAPIVersion:
  20. of: v1
  21. - documentIndex: *pvcDoc
  22. equal:
  23. path: metadata.name
  24. value: release-name-common-test-my-volume1
  25. - documentIndex: &otherPvcDoc 1
  26. isKind:
  27. of: PersistentVolumeClaim
  28. - documentIndex: *otherPvcDoc
  29. isAPIVersion:
  30. of: v1
  31. - documentIndex: *otherPvcDoc
  32. equal:
  33. path: metadata.name
  34. value: release-name-common-test-my-volume2