spec_test.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. suite: job spec test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should pass with workload enabled
  6. set:
  7. workload:
  8. workload-name:
  9. enabled: true
  10. primary: true
  11. type: Job
  12. podSpec:
  13. restartPolicy: Never
  14. asserts:
  15. - documentIndex: &jobDoc 0
  16. isKind:
  17. of: Job
  18. - documentIndex: *jobDoc
  19. isAPIVersion:
  20. of: batch/v1
  21. - documentIndex: *jobDoc
  22. isSubset:
  23. path: spec
  24. content:
  25. backoffLimit: 5
  26. completionMode: NonIndexed
  27. completions:
  28. parallelism: 1
  29. ttlSecondsAfterFinished: 120
  30. - it: should apply spec correctly
  31. set:
  32. workload:
  33. workload-name:
  34. enabled: true
  35. primary: true
  36. type: Job
  37. backoffLimit: 5
  38. completionMode: Indexed
  39. completions: 5
  40. parallelism: 5
  41. ttlSecondsAfterFinished: 100
  42. activeDeadlineSeconds: 100
  43. podSpec:
  44. restartPolicy: Never
  45. asserts:
  46. - documentIndex: *jobDoc
  47. isSubset:
  48. path: spec
  49. content:
  50. backoffLimit: 5
  51. completionMode: Indexed
  52. completions: 5
  53. parallelism: 5
  54. ttlSecondsAfterFinished: 100
  55. activeDeadlineSeconds: 100