metadata_test.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. suite: certificate metadata test
  2. templates:
  3. - common.yaml
  4. chart:
  5. appVersion: &appVer v9.9.9
  6. tests:
  7. - it: should pass with certificate created with labels and annotations
  8. set:
  9. label1: label1
  10. label2: global_label2
  11. annotation1: annotation1
  12. annotation2: global_annotation2
  13. global:
  14. labels:
  15. g_label1: global_label1
  16. g_label2: "{{ .Values.label2 }}"
  17. annotations:
  18. g_annotation1: global_annotation1
  19. g_annotation2: "{{ .Values.annotation2 }}"
  20. ixCertificates:
  21. "1":
  22. certificate: some_cert
  23. privatekey: some_key
  24. scaleCertificate:
  25. my-cert:
  26. enabled: true
  27. id: 1
  28. labels:
  29. label1: "{{ .Values.label1 }}"
  30. label2: label2
  31. annotations:
  32. annotation1: "{{ .Values.annotation1 }}"
  33. annotation2: annotation2
  34. asserts:
  35. - documentIndex: &secretDoc 0
  36. isKind:
  37. of: Secret
  38. - documentIndex: *secretDoc
  39. equal:
  40. path: metadata.annotations
  41. value:
  42. annotation1: annotation1
  43. annotation2: annotation2
  44. g_annotation1: global_annotation1
  45. g_annotation2: global_annotation2
  46. - documentIndex: *secretDoc
  47. equal:
  48. path: metadata.labels
  49. value:
  50. app: common-test-1.0.0
  51. release: RELEASE-NAME
  52. helm-revision: "0"
  53. helm.sh/chart: common-test-1.0.0
  54. app.kubernetes.io/name: common-test
  55. app.kubernetes.io/instance: RELEASE-NAME
  56. app.kubernetes.io/managed-by: Helm
  57. app.kubernetes.io/version: *appVer
  58. g_label1: global_label1
  59. g_label2: global_label2
  60. label1: label1
  61. label2: label2