cert_controller_test.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. suite: test cert controller deployment
  2. templates:
  3. - cert-controller-deployment.yaml
  4. tests:
  5. - it: should match snapshot of default values
  6. asserts:
  7. - matchSnapshot: {}
  8. - it: should set imagePullPolicy to Always
  9. set:
  10. certController.image.pullPolicy: Always
  11. asserts:
  12. - equal:
  13. path: spec.template.spec.containers[0].imagePullPolicy
  14. value: Always
  15. - it: should imagePullPolicy to be default value IfNotPresent
  16. asserts:
  17. - equal:
  18. path: spec.template.spec.containers[0].imagePullPolicy
  19. value: IfNotPresent
  20. - it: should override securityContext
  21. set:
  22. certController.podSecurityContext:
  23. runAsUser: 2000
  24. certController.securityContext:
  25. runAsUser: 3000
  26. asserts:
  27. - equal:
  28. path: spec.template.spec.securityContext
  29. value:
  30. runAsUser: 2000
  31. - equal:
  32. path: spec.template.spec.containers[0].securityContext
  33. value:
  34. allowPrivilegeEscalation: false
  35. capabilities:
  36. drop:
  37. - ALL
  38. readOnlyRootFilesystem: true
  39. runAsNonRoot: true
  40. runAsUser: 3000
  41. seccompProfile:
  42. type: RuntimeDefault
  43. - it: should override hostNetwork
  44. set:
  45. certController.hostNetwork: true
  46. asserts:
  47. - equal:
  48. path: spec.template.spec.hostNetwork
  49. value: true