From 899d3ed45ad91c64393ba48d169c8ab4fafa4c9b Mon Sep 17 00:00:00 2001 From: Anastas Dancha Date: Fri, 28 Jan 2022 17:02:31 -0500 Subject: [PATCH] test: add test for view and admin cluster role (#845) * adding naive tests as folllow-up to #836 Adding simple tests to verify the new aggregation roles are applied * remove extra manifests, install new roles in e2e-deploy-manifest --- Makefile | 2 ++ test/bats/e2e-provider.bats | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 920de65b6..8b2d28878 100644 --- a/Makefile +++ b/Makefile @@ -406,6 +406,8 @@ e2e-deploy-manifest: kubectl apply -f manifest_staging/deploy/rbac-secretprovidersyncing.yaml kubectl apply -f manifest_staging/deploy/secrets-store.csi.x-k8s.io_secretproviderclasses.yaml kubectl apply -f manifest_staging/deploy/secrets-store.csi.x-k8s.io_secretproviderclasspodstatuses.yaml + kubectl apply -f manifest_staging/deploy/role-secretproviderclasses-admin.yaml + kubectl apply -f manifest_staging/deploy/role-secretproviderclasses-viewer.yaml yq e '(.spec.template.spec.containers[1].image = "$(IMAGE_TAG)") | (.spec.template.spec.containers[1].args as $$x | $$x += "--enable-secret-rotation=true" | $$x[-1] style="double") | (.spec.template.spec.containers[1].args as $$x | $$x += "--rotation-poll-interval=30s" | $$x[-1] style="double")' 'manifest_staging/deploy/secrets-store-csi-driver.yaml' | kubectl apply -f - diff --git a/test/bats/e2e-provider.bats b/test/bats/e2e-provider.bats index ca3834a73..6c03da995 100644 --- a/test/bats/e2e-provider.bats +++ b/test/bats/e2e-provider.bats @@ -54,6 +54,12 @@ export API_VERSION=$(get_secrets_store_api_version) run kubectl get clusterrole/secretproviderclasses-role assert_success + run kubectl get clusterrole/secretproviderclasses-admin-role + assert_success + + run kubectl get clusterrole/secretproviderclasses-viewer-role + assert_success + run kubectl get clusterrole/secretproviderrotation-role assert_success