chore(ci): inspect docker logs after pytest failure
This commit is contained in:
parent
abf26f01d8
commit
4829814c58
|
@ -11,6 +11,7 @@ services:
|
||||||
- "EMQX_CLUSTER__STATIC__SEEDS=emqx@node1.emqx.io, emqx@node2.emqx.io"
|
- "EMQX_CLUSTER__STATIC__SEEDS=emqx@node1.emqx.io, emqx@node2.emqx.io"
|
||||||
- "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s"
|
- "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s"
|
||||||
- "EMQX_MQTT__MAX_TOPIC_ALIAS=10"
|
- "EMQX_MQTT__MAX_TOPIC_ALIAS=10"
|
||||||
|
- "EMQX_LOG__LEVEL=debug"
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
|
@ -38,6 +39,7 @@ services:
|
||||||
- "EMQX_CLUSTER__STATIC__SEEDS=emqx@node1.emqx.io, emqx@node2.emqx.io"
|
- "EMQX_CLUSTER__STATIC__SEEDS=emqx@node1.emqx.io, emqx@node2.emqx.io"
|
||||||
- "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s"
|
- "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s"
|
||||||
- "EMQX_MQTT__MAX_TOPIC_ALIAS=10"
|
- "EMQX_MQTT__MAX_TOPIC_ALIAS=10"
|
||||||
|
- "EMQX_LOG__LEVEL=debug"
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
|
@ -64,6 +66,8 @@ services:
|
||||||
tty: true
|
tty: true
|
||||||
networks:
|
networks:
|
||||||
emqx-bridge:
|
emqx-bridge:
|
||||||
|
volumes:
|
||||||
|
- ./scripts:/scripts
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
emqx-bridge:
|
emqx-bridge:
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
## This script is to run emqx cluster smoke tests (fvt) in github action
|
||||||
|
## This script is executed in pacho_client
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set +e
|
||||||
|
|
||||||
|
NODE1="node1.emqx.io"
|
||||||
|
NODE2="node2.emqx.io"
|
||||||
|
|
||||||
|
apk update && apk add git curl
|
||||||
|
git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
|
||||||
|
pip install pytest
|
||||||
|
pytest -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$NODE1"
|
||||||
|
RESULT=$?
|
||||||
|
pytest -v /paho.mqtt.testing/interoperability/test_cluster --host1 "$NODE1" --host2 "$NODE2"
|
||||||
|
RESULT=$(( RESULT + $? ))
|
||||||
|
pytest -v /paho.mqtt.testing/interoperability/test_client --host "$NODE1"
|
||||||
|
RESULT=$(( RESULT + $? ))
|
||||||
|
|
||||||
|
exit $RESULT
|
|
@ -44,12 +44,10 @@ jobs:
|
||||||
done
|
done
|
||||||
- name: make paho tests
|
- name: make paho tests
|
||||||
run: |
|
run: |
|
||||||
docker exec -i paho_client sh -c "apk update && apk add git curl \
|
if ! docker exec -i paho_client /scripts/pytest.sh; then
|
||||||
&& git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing \
|
docker logs node1.emqx.io
|
||||||
&& pip install pytest \
|
docker logs node2.emqx.io
|
||||||
&& pytest -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host node1.emqx.io \
|
fi
|
||||||
&& pytest -v /paho.mqtt.testing/interoperability/test_cluster --host1 node1.emqx.io --host2 node2.emqx.io \
|
|
||||||
&& pytest -v /paho.mqtt.testing/interoperability/test_client --host node1.emqx.io"
|
|
||||||
|
|
||||||
helm_test:
|
helm_test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -138,7 +136,14 @@ jobs:
|
||||||
emqx2=$(kubectl get pods emqx-2 -o jsonpath='{.status.podIP}')
|
emqx2=$(kubectl get pods emqx-2 -o jsonpath='{.status.podIP}')
|
||||||
|
|
||||||
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 --host $emqx_svc
|
||||||
|
RESULT=$?
|
||||||
pytest -v paho.mqtt.testing/interoperability/test_cluster --host1 $emqx1 --host2 $emqx2
|
pytest -v paho.mqtt.testing/interoperability/test_cluster --host1 $emqx1 --host2 $emqx2
|
||||||
|
RESULT=$((RESULT + $?))
|
||||||
|
if [ 0 -ne $RESULT ]; then
|
||||||
|
kubectl logs emqx-1
|
||||||
|
kubectl logs emqx-2
|
||||||
|
fi
|
||||||
|
exit $RESULT
|
||||||
|
|
||||||
relup_test:
|
relup_test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
Loading…
Reference in New Issue