Skip to content

Commit c4e535f

Browse files
committed
fix gotestsum
1 parent c5874eb commit c4e535f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

integration-test/start_server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fi
4949
set +e
5050
AMAZON_LINUX_2=$(grep 'Amazon Linux 2"' /etc/os-release)
5151
set -e
52-
if [[ -n "${AMAZON_LINUX_2}" ]]; then
52+
if [[ -n ${AMAZON_LINUX_2} ]]; then
5353
DOCKER_COMPOSE="docker-compose" # use docker-compose v1 for Jenkins AWS Linux 2
5454
else
5555
DOCKER_COMPOSE="docker compose"
@@ -63,7 +63,7 @@ docker rm ${SG_TEST_COUCHBASE_SERVER_DOCKER_NAME} || true
6363
# --volume: Makes and mounts a CBS folder for storing a CBCollect if needed
6464

6565
# use dockerhub if no registry is specified, allows for pre-release images from alternative registries
66-
if [[ ! "${COUCHBASE_DOCKER_IMAGE_NAME}" =~ ghcr.io/* && "${DOCKERHUB:-}" != "false" ]]; then
66+
if [[ ! ${COUCHBASE_DOCKER_IMAGE_NAME} =~ ghcr.io/* && ${DOCKERHUB:-} != "false" ]]; then
6767
COUCHBASE_DOCKER_IMAGE_NAME="couchbase/server:${COUCHBASE_DOCKER_IMAGE_NAME}"
6868
fi
6969

jenkins-integration-build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ if [ "${USE_GO_MODULES:-}" == "false" ]; then
5656
go get -u -v github.com/axw/gocov/gocov
5757
go get -u -v github.com/AlekSi/gocov-xml
5858
else
59-
go install -v github.com/axw/gocov/gocov@latest
60-
go install -v github.com/AlekSi/gocov-xml@latest
61-
go install -v gotest.tools/gotestsum@latest
59+
go install github.com/axw/gocov/gocov@latest
60+
go install github.com/AlekSi/gocov-xml@latest
61+
go install gotest.tools/gotestsum@latest
6262
fi
6363

6464
if [ "${SG_TEST_X509:-}" == "true" -a "${COUCHBASE_SERVER_PROTOCOL}" != "couchbases" ]; then
@@ -106,9 +106,9 @@ fi
106106

107107
if [ "${RUN_WALRUS}" == "true" ]; then
108108
# EE
109-
gotestsum --junitfile verbose_unit_ee.xml --format standard-verbose -- -coverprofile=coverage_walrus_ee.out -coverpkg=github.com/couchbase/sync_gateway/... -tags cb_sg_devmode,cb_sg_enterprise $GO_TEST_FLAGS github.com/couchbase/sync_gateway/${TARGET_PACKAGE} > verbose_unit_ee.out 2>&1 | true
109+
gotestsum --junitfile verbose_unit_ee.xml --junit-project-name rosmar-EE --format standard-verbose -- -coverprofile=coverage_walrus_ee.out -coverpkg=github.com/couchbase/sync_gateway/... -tags cb_sg_devmode,cb_sg_enterprise $GO_TEST_FLAGS ${TARGET_PACKAGE} > verbose_unit_ee.out 2>&1 | true
110110
# CE
111-
gotestsum --junitfile verbose_unit_ce.xml --format standard-verbose -- -coverprofile=coverage_walrus_ce.out -coverpkg=github.com/couchbase/sync_gateway/... -tags cb_sg_devmode $GO_TEST_FLAGS github.com/couchbase/sync_gateway/${TARGET_PACKAGE} > verbose_unit_ce.out 2>&1 | true
111+
gotestsum --junitfile verbose_unit_ce.xml --format standard-verbose --junit-project-name rosmar-CE -- -coverprofile=coverage_walrus_ce.out -coverpkg=github.com/couchbase/sync_gateway/... -tags cb_sg_devmode $GO_TEST_FLAGS ${TARGET_PACKAGE} > verbose_unit_ce.out 2>&1 | true
112112
fi
113113

114114
# Run CBS
@@ -137,7 +137,7 @@ else
137137
GO_TEST_FLAGS="${GO_TEST_FLAGS} -tags cb_sg_devmode"
138138
fi
139139

140-
gotestsum --junitfile="${INT_LOG_FILE_NAME}.xml" --format standard-verbose -- ${GO_TEST_FLAGS} -coverprofile=coverage_int.out -coverpkg=github.com/couchbase/sync_gateway/... github.com/couchbase/sync_gateway/${TARGET_PACKAGE} 2>&1 | stdbuf -oL tee "${INT_LOG_FILE_NAME}.out" | stdbuf -oL grep -a -E '(--- (FAIL|PASS|SKIP):|github.com/couchbase/sync_gateway(/.+)?\t|TEST: |panic: )'
140+
gotestsum --junitfile="${INT_LOG_FILE_NAME}.xml" --junit-project-name --format standard-verbose -- ${GO_TEST_FLAGS} -coverprofile=coverage_int.out -coverpkg=github.com/couchbase/sync_gateway/... ${TARGET_PACKAGE} 2>&1 | stdbuf -oL tee "${INT_LOG_FILE_NAME}.out" | stdbuf -oL grep -a -E '(--- (FAIL|PASS|SKIP):|github.com/couchbase/sync_gateway(/.+)?\t|TEST: |panic: )'
141141
if [ "${PIPESTATUS[0]}" -ne "0" ]; then # If test exit code is not 0 (failed)
142142
echo "Go test failed! Parsing logs to find cause..."
143143
TEST_FAILED=true

0 commit comments

Comments
 (0)