Skip to content

Commit

Permalink
gcp: test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tam7t committed Jul 27, 2021
1 parent 93e3e15 commit d1c874c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/bats/gcp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export RESOURCE_NAME=${RESOURCE_NAME:-"projects/735463103342/secrets/test-secret
export FILE_NAME=${FILE_NAME:-"secret"}
export SECRET_VALUE=${SECRET_VALUE:-"aHVudGVyMg=="}

setup-file() {
kubectl config set-context --current --namespace=$NAMESPACE
}

@test "install gcp provider" {
run kubectl apply -f $PROVIDER_YAML --namespace $PROVIDER_NAMESPACE
assert_success
Expand Down Expand Up @@ -56,6 +60,8 @@ export SECRET_VALUE=${SECRET_VALUE:-"aHVudGVyMg=="}
@test "deploy gcp secretproviderclass crd" {
envsubst < $BATS_TESTS_DIR/gcp_v1alpha1_secretproviderclass.yaml | kubectl apply -f -

sleep 10

cmd="kubectl get secretproviderclasses.secrets-store.csi.x-k8s.io/gcp -o yaml | grep gcp"
wait_for_process $WAIT_TIME $SLEEP_TIME "$cmd"
}
Expand Down

0 comments on commit d1c874c

Please sign in to comment.