Skip to content

Commit

Permalink
[FEATURE] add tests for ingress resource and permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay Iyyadurai Balasundaram <[email protected]>
  • Loading branch information
ibakshay committed Dec 11, 2024
1 parent 3cc01c3 commit fabd571
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/perses/templates/tests/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ data:
try "at most 3 times every 5s to get persistentvolumeclaims named '{{ include "perses.fullname" . }}.*' and verify that '.status.phase' is 'Bound'"
}
{{- end -}}
{{- if .Values.ingress.enabled }}
@test "Verify successful creation of ingress resource" {
verify "there is 1 ingress named '^{{ include "perses.fullname" . }}$'"
}
{{- end -}}
{{- end -}}
3 changes: 3 additions & 0 deletions charts/perses/templates/tests/test-permissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ rules:
- apiGroups: [""]
resources: ["pods", "persistentvolumeclaims", "services", "configmaps"]
verbs: ["get", "list"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down

0 comments on commit fabd571

Please sign in to comment.