volume_pvc_test.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. suite: pod pvc volume test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should pass with pvc volume
  6. set:
  7. workload:
  8. workload-name1:
  9. enabled: true
  10. primary: true
  11. type: Deployment
  12. podSpec: {}
  13. persistence:
  14. pvc-vol:
  15. enabled: true
  16. type: pvc
  17. asserts:
  18. - documentIndex: &deploymentDoc 1
  19. isKind:
  20. of: Deployment
  21. - documentIndex: *deploymentDoc
  22. contains:
  23. path: spec.template.spec.volumes
  24. content:
  25. name: pvc-vol
  26. persistentVolumeClaim:
  27. claimName: release-name-common-test-pvc-vol
  28. - it: should pass with pvc volume with existing claim
  29. set:
  30. workload:
  31. workload-name1:
  32. enabled: true
  33. primary: true
  34. type: Deployment
  35. podSpec: {}
  36. persistence:
  37. pvc-vol:
  38. enabled: true
  39. type: pvc
  40. existingClaim: some-existing-claim
  41. asserts:
  42. - documentIndex: &deploymentDoc 0
  43. isKind:
  44. of: Deployment
  45. - documentIndex: *deploymentDoc
  46. contains:
  47. path: spec.template.spec.volumes
  48. content:
  49. name: pvc-vol
  50. persistentVolumeClaim:
  51. claimName: some-existing-claim