charts/teleport-cluster-16.4.6/charts/teleport-operator/tests/rolebinding_test.yaml
2025-02-17 20:05:35 +08:00

44 lines
1.0 KiB
YAML

suite: Operator RoleBinding
templates:
- rolebinding.yaml
tests:
- it: creates no RoleBinding when operator is not enabled
values:
- ../.lint/disabled.yaml
asserts:
- hasDocuments:
count: 0
- it: creates no RoleBinding when rbac.create is false
set:
rbac:
create: false
asserts:
- hasDocuments:
count: 0
- it: creates a RoleBinding by default
asserts:
- containsDocument:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
name: RELEASE-NAME-teleport-operator
- it: shortens fullname if .Release.Name == .Chart.Name
release:
name: teleport-operator
asserts:
- containsDocument:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
name: teleport-operator
- it: respects the nameOverride
set:
nameOverride: operator
asserts:
- containsDocument:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
name: RELEASE-NAME-operator