rbac_test.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. suite: test rbac
  2. templates:
  3. - rbac.yaml
  4. tests:
  5. - it: should remove the labels aggregate-to-view to the view ClusterRole
  6. set:
  7. rbac:
  8. aggregateToView: false
  9. asserts:
  10. - notExists:
  11. path: metadata.labels["rbac.authorization.k8s.io/aggregate-to-view"]
  12. documentSelector:
  13. kind: ClusterRole
  14. path: metadata.name
  15. value: RELEASE-NAME-external-secrets-view
  16. - it: should remove the labels aggregate-to-edit to the view and edit ClusterRoles
  17. set:
  18. rbac:
  19. aggregateToEdit: false
  20. asserts:
  21. - notExists:
  22. path: metadata.labels["rbac.authorization.k8s.io/aggregate-to-edit"]
  23. documentSelector:
  24. kind: ClusterRole
  25. path: metadata.name
  26. value: RELEASE-NAME-external-secrets-view
  27. - notExists:
  28. path: metadata.labels["rbac.authorization.k8s.io/aggregate-to-edit"]
  29. documentSelector:
  30. kind: ClusterRole
  31. path: metadata.name
  32. value: RELEASE-NAME-external-secrets-edit