Skip to content

Commit 9653a80

Browse files
committed
Get repl set initiated in gh actions
W/out --verbose argument, mongo4 would throw errors. Could not reproduce locally and this was the only thing that would consistently work in the github action.
1 parent 21a7b9f commit 9653a80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/start_mongo.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ mkdir $mongodb_dir/data
88

99
$mongodb_dir/bin/mongod --dbpath $mongodb_dir/data --logpath $mongodb_dir/mongodb.log --fork --replSet mongoengine
1010
if (( $(echo "$MONGODB < 6.0" | bc -l) )); then
11-
mongo --quiet --eval 'db.runCommand("ping").ok' # Make sure mongo is awake
12-
mongo --quiet --eval "rs.initiate()"
11+
mongo --verbose --eval "rs.initiate()"
12+
mongo --quiet --eval "rs.status().ok"
1313
else
14-
mongosh --quiet --eval 'db.runCommand("ping").ok' # Make sure mongo is awake
15-
mongosh --quiet --eval "rs.initiate()"
14+
mongosh --verbose --eval "rs.initiate()"
15+
mongosh --quiet --eval "rs.status().ok"
1616
fi

0 commit comments

Comments
 (0)