name_test.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. suite: imagePullSecret name test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should generate correct name
  6. set:
  7. imagePullSecret:
  8. my-pull-secret1:
  9. enabled: true
  10. data:
  11. registry: reg1
  12. username: user1
  13. password: pass1
  14. email: mail1
  15. my-pull-secret2:
  16. enabled: true
  17. data:
  18. registry: reg2
  19. username: user2
  20. password: pass2
  21. email: mail2
  22. asserts:
  23. - documentIndex: &secretDoc 0
  24. isKind:
  25. of: Secret
  26. - documentIndex: *secretDoc
  27. isAPIVersion:
  28. of: v1
  29. - documentIndex: *secretDoc
  30. equal:
  31. path: metadata.name
  32. value: release-name-common-test-my-pull-secret1
  33. - documentIndex: &otherSecretDoc 1
  34. isKind:
  35. of: Secret
  36. - documentIndex: *otherSecretDoc
  37. isAPIVersion:
  38. of: v1
  39. - documentIndex: *otherSecretDoc
  40. equal:
  41. path: metadata.name
  42. value: release-name-common-test-my-pull-secret2