Skip to content

Commit

Permalink
NODE-5583 add trap on_exit for ingress-controller deployment on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
braek-neck committed Aug 6, 2024
1 parent 7dac566 commit 7b06253
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ jobs:

- name: Create cluster
run: |
echo ${DOCKERHUB_PASSWORD} | docker login -u ${DOCKERHUB_USER} --password-stdin
kind create cluster --image=kindest/node:${{ matrix.k8s }}
- name: Run smoke tests
Expand Down
17 changes: 17 additions & 0 deletions test/smoke/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,21 @@ else
export TAG
fi

function describe_pods_on_exit() {
controller_label="app.kubernetes.io/component=controller"
tarantool_label="app.kubernetes.io/component=controller-wallarm-tarantool"
workload_label="app=workload"

echo "#################### Describe controller POD ####################"
kubectl describe pod -l $controller_label
echo "#################### Describe Tarantool POD ####################"
kubectl describe pod -l $tarantool_label
echo "#################### Describe workload POD ####################"
kubectl describe pod -l $workload_label
}

trap describe_pods_on_exit EXIT

echo "[test-env] installing Helm chart using TAG=${TAG} ..."
cat << EOF | helm upgrade --install ingress-nginx "${DIR}/../../charts/ingress-nginx" --wait --values -
fullnameOverride: wallarm-ingress
Expand Down Expand Up @@ -164,5 +179,7 @@ echo "[test-env] deploying test workload ..."
kubectl apply -f "${DIR}"/workload.yaml
kubectl wait --for=condition=Ready pods --all --timeout=60s

trap - EXIT

echo "[test-env] running smoke tests suite ..."
make -C "${DIR}"/../../ smoke-test

0 comments on commit 7b06253

Please sign in to comment.