From 59c2bbe9adf5951cb87a9bec8f6c73783bd6ffe5 Mon Sep 17 00:00:00 2001 From: Rory Z Date: Tue, 30 Aug 2022 18:09:25 +0800 Subject: [PATCH] chore: use minikube instead k3s --- .github/workflows/run_fvt_tests.yaml | 32 +++++----------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/.github/workflows/run_fvt_tests.yaml b/.github/workflows/run_fvt_tests.yaml index 601ab304f..02d7caa3d 100644 --- a/.github/workflows/run_fvt_tests.yaml +++ b/.github/workflows/run_fvt_tests.yaml @@ -80,30 +80,18 @@ jobs: echo "TARGET=emqx/emqx" >> $GITHUB_ENV make emqx-docker fi - - name: install k3s - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" - run: | - sudo sh -c "echo \"127.0.0.1 $(hostname)\" >> /etc/hosts" - curl -sfL https://get.k3s.io | sh - - sudo chmod 644 /etc/rancher/k3s/k3s.yaml - kubectl cluster-info + - run: minikube start - name: install helm - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" run: | curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 sudo chmod 700 get_helm.sh sudo ./get_helm.sh helm version - name: run emqx on chart - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" timeout-minutes: 5 run: | version=$(./pkg-vsn.sh) - sudo docker save ${TARGET}:$version -o emqx.tar.gz - sudo k3s ctr image import emqx.tar.gz + minikube image load ${TARGET}:$version sed -i -r "s/^appVersion: .*$/appVersion: \"${version}\"/g" deploy/charts/emqx/Chart.yaml sed -i '/emqx_telemetry/d' deploy/charts/emqx/values.yaml @@ -128,22 +116,16 @@ jobs: done - name: get emqx-0 pods log if: failure() - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" run: | kubectl describe pods emqx-0 kubectl logs emqx-0 - name: get emqx-1 pods log if: failure() - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" run: | kubectl describe pods emqx-1 kubectl logs emqx-1 - name: get emqx-2 pods log if: failure() - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" run: | kubectl describe pods emqx-2 kubectl logs emqx-2 @@ -157,16 +139,12 @@ jobs: pip install pytest echo "$HOME/.local/bin" >> $GITHUB_PATH - name: run paho test - env: - KUBECONFIG: "/etc/rancher/k3s/k3s.yaml" run: | - emqx_svc=$(kubectl get svc --namespace default emqx -o jsonpath="{.spec.clusterIP}") - emqx1=$(kubectl get pods emqx-1 -o jsonpath='{.status.podIP}') - emqx2=$(kubectl get pods emqx-2 -o jsonpath='{.status.podIP}') + nohup kubectl port-forward svc emqx 1883:1883 & - pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host $emqx_svc + pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic RESULT=$? - pytest -v paho.mqtt.testing/interoperability/test_cluster --host1 $emqx1 --host2 $emqx2 + pytest -v paho.mqtt.testing/interoperability/test_cluster RESULT=$((RESULT + $?)) if [ 0 -ne $RESULT ]; then kubectl logs emqx-1