1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/integration/run-tests.sh
Alexey Matvievsky e5f2f1414e
Improve integration tests (#4019)
Improve integration tests
2022-09-19 14:47:13 +04:00

20 lines
460 B
Bash
Executable File

#!/usr/bin/env bash
# Run all test if no arguments are given, run tests if they've passed as arguments
# For example: ./run-tests.sh TestNexusIntegration TestNPMIntegration
pushd ..
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
if [[ "$*" ]]
then
for testName in "$@"
do
go test -v -tags integration -run "$testName" ./integration/...
done
else
go test -v -tags integration ./integration/...
fi
popd || exit