From 420e52026430cf23b9ba072a725dd6c5ee8a2f10 Mon Sep 17 00:00:00 2001 From: Debdut Chakraborty Date: Tue, 12 Nov 2024 13:03:25 +0530 Subject: [PATCH] snap: fix new mongosh connectionstring for rs update --- snap/snap.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snap.bats b/snap/snap.bats index 1f1e0d6..8081340 100644 --- a/snap/snap.bats +++ b/snap/snap.bats @@ -87,7 +87,7 @@ setup_file() { @test "MongoDb should run on changed port via config" { run sudo sed -Ei 's/( +port:) 27017/\1 27018/' /var/snap/rocketchat-server/current/mongod.conf assert_success - run --separate-stderr /snap/rocketchat-server/current/usr/bin/mongosh --quiet --eval ' + run --separate-stderr /snap/rocketchat-server/current/usr/bin/mongosh 'mongodb://localhost:27017?directConnection=true&retryWrites=false' --quiet --eval ' config = db.getSiblingDB("local").system.replset.findOne( { "_id": "rs0" } ); config.members[0].host = "localhost:27018"; print(JSON.stringify(db.getSiblingDB("local").system.replset.updateOne( { "_id": "rs0" }, { $set: config } )));