Skip to content

Commit

Permalink
generalize compose config
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakudyaA committed Aug 21, 2023
1 parent c3cf0e2 commit 918cfc3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scenario_tests/s3/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ set -e
source ../test-env.sh

# Run service
docker compose up -d
if [[ $(dpkg -l | grep "docker-compose") > /dev/null ]];then
VERSION='docker-compose'
else
VERSION='docker compose'
fi
${VERSION} up -d

sleep 30

# Perform DB backup to s3 endpoint
docker compose exec pg_restore /backup-scripts/backups.sh
${VERSION} exec pg_restore /backup-scripts/backups.sh

# Execute tests
docker compose exec pg_restore /bin/bash /tests/test_restore.sh
${VERSION} exec pg_restore /bin/bash /tests/test_restore.sh


docker compose down -v
${VERSION} down -v

0 comments on commit 918cfc3

Please sign in to comment.