Skip to content

Commit

Permalink
Work against untared content in test
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Dec 30, 2022
1 parent d980e47 commit c5b9926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/extend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
image: offen/docker-volume-backup:${TEST_VERSION:-canary}
restart: always
labels:
- docker-volume-backup.copy-post=/bin/sh -c 'rsync $$COMMAND_RUNTIME_ARCHIVE_FILEPATH /local'
- docker-volume-backup.copy-post=/bin/sh -c 'mkdir -p /tmp/unpack && tar -xvf $$COMMAND_RUNTIME_ARCHIVE_FILEPATH -C /tmp/unpack && rsync -r /tmp/unpack /local'
environment:
BACKUP_FILENAME: test.tar.gz
BACKUP_CRON_EXPRESSION: 0 0 5 31 2 ?
Expand Down
6 changes: 3 additions & 3 deletions test/extend/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ sleep 5

expect_running_containers "2"

tmp_dir=$(mktemp -d)
tar -xvf ./local/test.tar.gz -C $tmp_dir
if [ ! -f "$tmp_dir/backup/app_data/offen.db" ]; then
find ./local

if [ ! -f "./local/backup/app_data/offen.db" ]; then
fail "Could not find expected file in untared archive."
fi

Expand Down

0 comments on commit c5b9926

Please sign in to comment.