Skip to content

Commit

Permalink
snap: fix new mongosh connectionstring for rs update
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb committed Nov 12, 2024
1 parent 96976fb commit 420e520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snap/snap.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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 } )));
Expand Down

0 comments on commit 420e520

Please sign in to comment.