File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ init: ## Install linters
7171 cd tools && go generate -x -tags=tools
7272
7373build : # # Compile using plain go build
74- env CGO_ENABLED=1 go build -ldflags=" $( GO_BUILD_LDFLAGS) " -o $(PMM_RELEASE_PATH ) /mongodb_exporter -tags gssapi
74+ CGO_ENABLED=1 go build -ldflags=" $( GO_BUILD_LDFLAGS) " -o $(PMM_RELEASE_PATH ) /mongodb_exporter -tags gssapi
7575
7676release : # # Build the binaries using goreleaser
7777 docker run --rm --privileged \
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ func TestGSSAPIAuth(t *testing.T) {
280280 "mongodb_up" ,
281281 }
282282 err = testutil .CollectAndCompare (gc , expected , filter ... )
283- assert .NoError (t , err , "mongodb_up metric should be 1" )
283+ require .NoError (t , err , "mongodb_up metric should be 1" )
284284
285285 res := r .Unregister (gc )
286286 assert .True (t , res )
Original file line number Diff line number Diff line change 33username=${MONGO_INITDB_ROOT_USERNAME}
44password=${MONGO_INITDB_ROOT_PASSWORD}
55
6- echo " Waiting for startup.."
6+ echo " Waiting for startup..."
7+ max_attempts=20
8+ attempts=0
79until mongosh --host 127.0.0.1:27017 -u ${username} -p ${password} --eval ' quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' & > /dev/null; do
10+ if [ $attempts -eq $max_attempts ]; then
11+ echo " Failed to check MongoDB status after $max_attempts attempts"
12+ exit 1
13+ fi
814 printf ' .'
915 sleep 1
16+ attempts=$(( attempts+ 1 ))
1017done
1118
1219echo " Started.."
You can’t perform that action at this time.
0 commit comments