label container in cli test

This commit is contained in:
Frederik Ring 2021-07-11 20:21:17 +02:00
parent da75d232f4
commit 5fd6f66324
5 changed files with 8 additions and 5 deletions

View File

@ -15,7 +15,7 @@ jobs:
name: Run tests
working_directory: ~/docker-volume-backup/test
command: |
./test.sh
./test.sh canary
build:
docker:

View File

@ -23,6 +23,7 @@ docker exec minio mkdir -p /data/backup
docker run -d \
--name offen \
--network test_network \
--label "docker-volume-backup.stop-during-backup=true" \
-v app_data:/var/opt/offen/ \
offen/offen:latest
@ -40,7 +41,7 @@ docker run -d \
--env AWS_S3_BUCKET_NAME=backup \
--env BACKUP_FILENAME=test.tar.gz \
--env BACKUP_CRON_EXPRESSION="0 0 5 31 2 ?" \
offen/docker-volume-backup:canary
offen/docker-volume-backup:$TEST_VERSION
docker exec backup backup

View File

@ -13,7 +13,7 @@ services:
- backup_data:/data
backup: &default_backup_service
image: offen/docker-volume-backup:canary
image: offen/docker-volume-backup:${TEST_VERSION}
depends_on:
- minio
restart: always

View File

@ -19,7 +19,7 @@ services:
- backup_data:/data
backup: &default_backup_service
image: offen/docker-volume-backup:canary
image: offen/docker-volume-backup:${TEST_VERSION}
depends_on:
- minio
deploy:

View File

@ -2,13 +2,15 @@
set -e
TEST_VERSION=${1:-canary}
for dir in $(ls -d -- */); do
test="${dir}run.sh"
echo "################################################"
echo "Now running $test"
echo "################################################"
echo ""
/bin/sh $test
TEST_VERSION=$TEST_VERSION /bin/sh $test
echo ""
echo "$test passed"
echo ""