borgmatic/scripts/run-end-to-end-tests

23 lines
828 B
Text
Raw Permalink Normal View History

#!/bin/sh
2023-03-28 20:09:25 +02:00
# This script is for running end-to-end tests on a developer machine. It sets up database containers
# to run tests against, runs the tests, and then tears down the containers.
#
# Run this script from the root directory of the borgmatic source.
#
# For more information, see:
# https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/
2024-03-07 06:24:44 +01:00
set -e
USER_PODMAN_SOCKET_PATH=/run/user/$UID/podman/podman.sock
if [ -e "$USER_PODMAN_SOCKET_PATH" ]; then
export DOCKER_HOST="unix://$USER_PODMAN_SOCKET_PATH"
fi
2024-03-07 00:21:45 +01:00
docker-compose --file tests/end-to-end/docker-compose.yaml --progress quiet up --force-recreate \
2024-03-07 00:29:56 +01:00
--renew-anon-volumes --detach
docker-compose --file tests/end-to-end/docker-compose.yaml --progress quiet attach tests
docker-compose --file tests/end-to-end/docker-compose.yaml --progress quiet down