Add teleport
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
suite: Updater Role
|
||||
templates:
|
||||
- updater/rolebinding.yaml
|
||||
tests:
|
||||
#
|
||||
# Basic tests
|
||||
#
|
||||
- it: does not create a RoleBinding when updater.enabled is false (default)
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
- it: creates a RoleBinding when updater.enabled is true
|
||||
values:
|
||||
- ../.lint/updater.yaml
|
||||
asserts:
|
||||
- containsDocument:
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
name: RELEASE-NAME-updater
|
||||
namespace: NAMESPACE
|
||||
- it: does not create a RoleBinding when updater.enabled is true but rbac creation is disabled
|
||||
values:
|
||||
- ../.lint/updater.yaml
|
||||
set:
|
||||
rbac:
|
||||
create: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
#
|
||||
# Catch-all content test
|
||||
#
|
||||
- it: sets the correct rolebinding content
|
||||
values:
|
||||
- ../.lint/updater.yaml
|
||||
asserts:
|
||||
- equal:
|
||||
path: roleRef
|
||||
value:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: RELEASE-NAME-updater
|
||||
- equal:
|
||||
path: subjects
|
||||
value:
|
||||
- kind: ServiceAccount
|
||||
name: RELEASE-NAME-updater
|
||||
namespace: NAMESPACE
|
||||
Reference in New Issue
Block a user