validation_test.yaml 853 B

123456789101112131415161718192021222324252627282930
  1. suite: deployment validation test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should fail with invalid strategy
  6. set:
  7. workload:
  8. workload-name:
  9. enabled: true
  10. primary: true
  11. type: Deployment
  12. strategy: not-a-strategy
  13. podSpec: {}
  14. asserts:
  15. - failedTemplate:
  16. errorMessage: Deployment - Expected <strategy> to be one of [Recreate, RollingUpdate], but got [not-a-strategy]
  17. - it: should fail with rollingUpdate not a dict
  18. set:
  19. workload:
  20. workload-name:
  21. enabled: true
  22. primary: true
  23. type: Deployment
  24. strategy: RollingUpdate
  25. rollingUpdate: "not a dict"
  26. podSpec: {}
  27. asserts:
  28. - failedTemplate:
  29. errorMessage: Deployment - Expected <rollingUpdate> to be a dictionary, but got [string]