charts/teleport-kube-agent/tests/rolebinding_test.yaml
2024-08-15 22:45:43 +08:00

35 lines
749 B
YAML

suite: RoleBinding
templates:
- rolebinding.yaml
tests:
- it: Create a RoleBinding when upgrading
release:
upgrade: true
set:
unitTestUpgrade: true
asserts:
- hasDocuments:
count: 1
- isKind:
of: RoleBinding
- it: creates a RoleBinding
asserts:
- hasDocuments:
count: 1
- isKind:
of: RoleBinding
- matchSnapshot: {}
- it: sets RoleBinding labels when specified
values:
- ../.lint/extra-labels.yaml
asserts:
- equal:
path: metadata.labels.app\.kubernetes\.io/name
value: teleport-kube-agent
- equal:
path: metadata.labels.resource
value: rolebinding
- matchSnapshot: {}