Skip to content

Commit a193c63

Browse files
committed
fix: use trap for cleanup in integration-tests.sh
Replace || true pattern with trap 'docker-compose down' EXIT so cleanup always runs on exit while preserving the real exit code. Ticket: WCN-399
1 parent 9030608 commit a193c63

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

scripts/run-integration-tests.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ set -e
44

55
echo "Running integration tests..."
66

7-
docker-compose -f docker-compose.integ.yml up --build --abort-on-container-exit || true
7+
trap 'docker-compose -f docker-compose.integ.yml down' EXIT
88

9-
exit_code=$?
10-
11-
docker-compose -f docker-compose.integ.yml down
12-
13-
exit $exit_code
9+
docker-compose -f docker-compose.integ.yml up --build --abort-on-container-exit

0 commit comments

Comments
 (0)