name_test.yaml 906 B

123456789101112131415161718192021222324252627282930313233343536
  1. suite: configmap name test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should generate correct name
  6. set:
  7. configmap:
  8. my-configmap1:
  9. enabled: true
  10. data:
  11. foo: bar
  12. my-configmap2:
  13. enabled: true
  14. data:
  15. foo: bar
  16. asserts:
  17. - documentIndex: &configmapDoc 0
  18. isKind:
  19. of: ConfigMap
  20. - documentIndex: *configmapDoc
  21. isAPIVersion:
  22. of: v1
  23. - documentIndex: *configmapDoc
  24. equal:
  25. path: metadata.name
  26. value: release-name-common-test-my-configmap1
  27. - documentIndex: &otherConfigmapDoc 1
  28. isKind:
  29. of: ConfigMap
  30. - documentIndex: *otherConfigmapDoc
  31. isAPIVersion:
  32. of: v1
  33. - documentIndex: *otherConfigmapDoc
  34. equal:
  35. path: metadata.name
  36. value: release-name-common-test-my-configmap2