mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
e5f2f1414e
Improve integration tests
20 lines
460 B
Bash
Executable File
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
|