name_test.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. suite: service account name test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should generate correct name
  6. set:
  7. serviceAccount:
  8. my-sa:
  9. enabled: true
  10. primary: true
  11. my-sa1:
  12. enabled: true
  13. my-sa2:
  14. enabled: true
  15. asserts:
  16. - documentIndex: &primaryServiceAccount 0
  17. isKind:
  18. of: ServiceAccount
  19. - documentIndex: *primaryServiceAccount
  20. isAPIVersion:
  21. of: v1
  22. - documentIndex: *primaryServiceAccount
  23. equal:
  24. path: metadata.name
  25. value: release-name-common-test
  26. - documentIndex: &serviceAccount 1
  27. isKind:
  28. of: ServiceAccount
  29. - documentIndex: *serviceAccount
  30. isAPIVersion:
  31. of: v1
  32. - documentIndex: *serviceAccount
  33. equal:
  34. path: metadata.name
  35. value: release-name-common-test-my-sa1
  36. - documentIndex: &otherServiceAccount 2
  37. isKind:
  38. of: ServiceAccount
  39. - documentIndex: *otherServiceAccount
  40. isAPIVersion:
  41. of: v1
  42. - documentIndex: *otherServiceAccount
  43. equal:
  44. path: metadata.name
  45. value: release-name-common-test-my-sa2