Error out if run-full-tests is run not inside a test container.

This commit is contained in:
Dan Helfman 2023-03-28 12:02:07 -07:00
parent 3512191f3e
commit f709125110
3 changed files with 12 additions and 1 deletions

View File

@ -24,6 +24,8 @@ clone:
steps: steps:
- name: build - name: build
image: alpine:3.13 image: alpine:3.13
environment:
TEST_CONTAINER: true
pull: always pull: always
commands: commands:
- scripts/run-full-tests - scripts/run-full-tests

View File

@ -8,7 +8,14 @@
# For more information, see: # For more information, see:
# https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/ # https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/
set -ex set -e
if [ -z "$TEST_CONTAINER" ] ; then
echo "This script is designed to work inside a test container and is not intended to"
echo "be run manually. If you're trying to run borgmatic's end-to-end tests, execute"
echo "scripts/run-end-to-end-dev-tests instead."
exit 1
fi
apk add --no-cache python3 py3-pip borgbackup postgresql-client mariadb-client mongodb-tools \ apk add --no-cache python3 py3-pip borgbackup postgresql-client mariadb-client mongodb-tools \
py3-ruamel.yaml py3-ruamel.yaml.clib bash sqlite py3-ruamel.yaml py3-ruamel.yaml.clib bash sqlite

View File

@ -17,6 +17,8 @@ services:
MONGO_INITDB_ROOT_PASSWORD: test MONGO_INITDB_ROOT_PASSWORD: test
tests: tests:
image: alpine:3.13 image: alpine:3.13
environment:
TEST_CONTAINER: true
volumes: volumes:
- "../..:/app:ro" - "../..:/app:ro"
tmpfs: tmpfs: