Skip to content

Commit

Permalink
test: add test for view and admin cluster role (kubernetes-sigs#845)
Browse files Browse the repository at this point in the history
* adding naive tests as folllow-up to kubernetes-sigs#836

Adding simple tests to verify the new aggregation roles are applied

* remove extra manifests, install new roles in e2e-deploy-manifest
  • Loading branch information
anapsix authored Jan 28, 2022
1 parent d32ca72 commit 899d3ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -

Expand Down
6 changes: 6 additions & 0 deletions test/bats/e2e-provider.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 899d3ed

Please sign in to comment.