Skip to content

Commit

Permalink
Upgrade to Helm 3 for E2E Tests (#41)
Browse files Browse the repository at this point in the history
* upgrade script to helm 3 in makefile

* update helm install to v3 syntax

* create dev namespace inside kind cluster on azure pipeline
  • Loading branch information
bdlb77 authored Apr 7, 2020
1 parent 57e0682 commit d3aaf4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,13 @@ e2e-bootstrap:
# Download and install kind
curl -L https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-amd64 --output kind && chmod +x kind && sudo mv kind /usr/local/bin/
# Download and install Helm
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
# Create kind cluster
kind create cluster --config kind-config.yaml --image kindest/node:v${KUBERNETES_VERSION}
# Build image
DOCKER_IMAGE="e2e/secrets-store-csi-driver-provider-azure" IMAGE_VERSION=e2e-$$(git rev-parse --short HEAD) make image
# Load image into kind cluster
kind load docker-image --name kind e2e/secrets-store-csi-driver-provider-azure:e2e-$$(git rev-parse --short HEAD)
# Set up tiller
kubectl --namespace kube-system --output yaml create serviceaccount tiller --dry-run | kubectl --kubeconfig $$(kind get kubeconfig-path) apply -f -
kubectl create --output yaml clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller --dry-run | kubectl --kubeconfig $$(kind get kubeconfig-path) apply -f -
helm init --service-account tiller --upgrade --wait --kubeconfig $$(kind get kubeconfig-path)

.PHONY: e2e-azure
e2e-azure:
bats -t test/bats/azure.bats
Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ steps:
- script: |
make e2e-bootstrap
export KUBECONFIG=$(kind get kubeconfig-path)
kubectl create ns dev
make e2e-azure
workingDirectory: '$(modulePath)'
displayName: "e2e-azure"
Expand Down
2 changes: 1 addition & 1 deletion test/bats/azure.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ setup() {
}

@test "install driver helm chart" {
run helm install ${GOPATH}/src/k8s.io/secrets-store-csi-driver/charts/secrets-store-csi-driver -n csi-secrets-store --namespace dev
run helm install csi-secrets-store ${GOPATH}/src/k8s.io/secrets-store-csi-driver/charts/secrets-store-csi-driver --namespace dev
assert_success
}

Expand Down

0 comments on commit d3aaf4e

Please sign in to comment.