validation_test.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. suite: container validation test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should fail with more than one primary container on a workload
  6. set:
  7. workload:
  8. workload-name:
  9. enabled: true
  10. primary: true
  11. type: Deployment
  12. podSpec:
  13. containers:
  14. container-name1:
  15. enabled: true
  16. primary: true
  17. container-name2:
  18. enabled: true
  19. primary: true
  20. asserts:
  21. - failedTemplate:
  22. errorMessage: Container - Only one container can be primary per workload
  23. - it: should fail with no primary container on a workload
  24. set:
  25. workload:
  26. workload-name:
  27. enabled: true
  28. primary: true
  29. type: Deployment
  30. podSpec:
  31. containers:
  32. container-name1:
  33. enabled: true
  34. primary: false
  35. container-name2:
  36. enabled: true
  37. primary: false
  38. asserts:
  39. - failedTemplate:
  40. errorMessage: Container - At least one enabled container must be primary per workload