run-end-to-end-tests 828 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. # This script is for running end-to-end tests on a developer machine. It sets up database containers
  3. # to run tests against, runs the tests, and then tears down the containers.
  4. #
  5. # Run this script from the root directory of the borgmatic source.
  6. #
  7. # For more information, see:
  8. # https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/
  9. set -e
  10. USER_PODMAN_SOCKET_PATH=/run/user/$UID/podman/podman.sock
  11. if [ -e "$USER_PODMAN_SOCKET_PATH" ]; then
  12. export DOCKER_HOST="unix://$USER_PODMAN_SOCKET_PATH"
  13. fi
  14. docker-compose --file tests/end-to-end/docker-compose.yaml --progress quiet up --force-recreate \
  15. --renew-anon-volumes --detach
  16. docker-compose --file tests/end-to-end/docker-compose.yaml --progress quiet attach tests
  17. docker-compose --file tests/end-to-end/docker-compose.yaml --progress quiet down