Saltstack Official Nginx Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
491B

  1. #!/bin/bash
  2. set -ev
  3. test -z $2 && echo "Usage: ${0} FORMULA_NAME OS_ID" && exit 1
  4. export FORMULA_NAME=$1
  5. export OS_ID=$2
  6. function docker-run-pytest() {
  7. docker run --rm \
  8. -v "$@":/opt/tests \
  9. --env=STAGE=TEST \
  10. -h "salt-testing-${OS_ID}" \
  11. --name "salt-testing-${OS_ID}" \
  12. -it ${FORMULA_NAME}:"salt-testing-${OS_ID}" \
  13. pytest -sv /opt/tests
  14. }
  15. for i in $(find $PWD/tests/pytests/* -maxdepth 0 -type d); do
  16. docker-run-pytest $i;
  17. done