github.com/NpoolPlatform/chain-middleware@v0.0.0-20240228100535-eb1bcf896eb9/hack/test-go-integration.sh (about) 1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 # Default timeout is 1800s 6 TEST_TIMEOUT=1800 7 8 for arg in "$@" 9 do 10 case $arg in 11 -t=*|--timeout=*) 12 TEST_TIMEOUT="${arg#*=}" 13 shift 14 ;; 15 -t|--timeout) 16 TEST_TIMEOUT="$2" 17 shift 18 shift 19 esac 20 done 21 22 REPO_ROOT=$(git rev-parse --show-toplevel) 23 cd "${REPO_ROOT}" 24 25 GO111MODULE=on go test -v -timeout="${TEST_TIMEOUT}s" -count=1 -cover -coverprofile coverage.out ./cmd/... 26 go tool cover -html coverage.out -o coverage.html