Refactor e2e tests

- remove Helm v2 and Tiller
- update Helm v3 to 3.5.0
- rename scripts dir to test

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2021-01-28 13:05:34 +02:00
parent f220644263
commit f30e3f89ed
8 changed files with 19 additions and 26 deletions

View File

@@ -11,8 +11,7 @@ jobs:
strategy:
matrix:
helm-version:
- 2.16.12
- 3.3.4
- 3.5.0
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -21,19 +20,16 @@ jobs:
uses: engineerd/setup-kind@v0.5.0
- name: Build container image
run: |
./hack/build.sh
./test/build.sh
kind load docker-image test/podinfo:latest
- name: Setup Helm
uses: ./.github/actions/helm
with:
helm-version: ${{ matrix.helm-version }}
- name: Install Tiller
if: ${{ startsWith(matrix.helm-version, '2') }}
run: ./hack/tiller.sh
- name: Deploy
run: ./hack/deploy.sh
run: ./test/deploy.sh
- name: Run integration tests
run: ./hack/test.sh
run: ./test/test.sh
- name: Debug failure
if: failure()
run: |

View File

@@ -1,5 +1,20 @@
#! /usr/bin/env sh
mkdir -p bin
cat > ./bin/kind.yaml <<EOF
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
EOF
# create the kind cluster
kind create cluster --config=kind.yaml

View File

@@ -1,11 +0,0 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP

View File

@@ -1,7 +0,0 @@
#! /usr/bin/env sh
set -e
kubectl --namespace kube-system create sa tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --upgrade --wait