From 918cfc35ba3a738f1cb22a6490c9226efe600678 Mon Sep 17 00:00:00 2001 From: Admire Nyakudya Date: Mon, 21 Aug 2023 21:33:10 +0200 Subject: [PATCH] generalize compose config --- scenario_tests/s3/test.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scenario_tests/s3/test.sh b/scenario_tests/s3/test.sh index a2327ea..5db9128 100755 --- a/scenario_tests/s3/test.sh +++ b/scenario_tests/s3/test.sh @@ -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