pytest.sh 869 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. ## This script is to run emqx cluster smoke tests (fvt) in github action
  3. ## This script is executed in paho_client
  4. set -x
  5. set +e
  6. EMQX_TEST_DB_BACKEND=$1
  7. if [ "$EMQX_TEST_DB_BACKEND" = "rlog" ]
  8. then
  9. # target only replica to avoid replication races
  10. TARGET_HOST="node2.emqx.io"
  11. else
  12. # use loadbalancer
  13. TARGET_HOST="haproxy"
  14. fi
  15. apk update && apk add git curl
  16. git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
  17. pip install pytest
  18. pytest -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$TARGET_HOST"
  19. RESULT=$?
  20. pytest -v /paho.mqtt.testing/interoperability/test_client --host "$TARGET_HOST"
  21. RESULT=$(( RESULT + $? ))
  22. # pytest -v /paho.mqtt.testing/interoperability/test_cluster --host1 "node1.emqx.io" --host2 "node2.emqx.io"
  23. # RESULT=$(( RESULT + $? ))
  24. exit $RESULT