Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 78b6da1

Browse files
committed
Return correct exit code from test script
Change-Id: Ib0d5f0374b5bcf72aef3a23e467d25503259463e Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
1 parent 44e57b3 commit 78b6da1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/scripts/integration.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash -exu
22

33
# Packages to exclude
44
PKGS=`go list github.com/hyperledger/fabric-sdk-go/test/... 2> /dev/null | \
@@ -11,5 +11,13 @@ echo "Running integration tests..."
1111
cd ../../
1212
gocov test -ldflags "$GO_LDFLAGS" $PKGS -p 1 -timeout=10m | gocov-xml > integration-report.xml
1313

14-
echo "Cleaning up..."
15-
cd ./test/fixtures && docker-compose down
14+
if [ $? -eq 0 ]
15+
then
16+
echo "Integration tests passed. Cleaning up..."
17+
cd ./test/fixtures && docker-compose down
18+
exit 0
19+
else
20+
echo "Integration tests failed. Cleaning up..."
21+
cd ./test/fixtures && docker-compose down
22+
exit 1
23+
fi

0 commit comments

Comments
 (0)