Skip to content

Commit a16bdfa

Browse files
chore: use correct mongosh syntax in test setup readme (#3656)
1 parent 325c4bc commit a16bdfa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ The following steps will walk you through how to start and test a load balancer.
270270

271271
Initiate the config server in the shell:
272272
```shell
273-
mongosh "mongodb://localhost:27217" --exec "rs.initiate( { _id: "test", configsvr: true, members: [ { _id: 0, host: "localhost:27217" } ] })"
273+
mongosh "mongodb://localhost:27217" --eval "rs.initiate( { _id: 'test', configsvr: true, members: [ { _id: 0, host: 'localhost:27217' } ] })"
274274
```
275275

276276
Create shard replica sets:
@@ -280,7 +280,7 @@ The following steps will walk you through how to start and test a load balancer.
280280

281281
Initiate replica set in the shell:
282282
```shell
283-
mongosh "mongodb://localhost:27218" --exec "rs.initiate( { _id: "testing", members: [ { _id: 0, host: "localhost:27218" }, { _id: 1, host: "localhost:27219" }, { _id: 2, host: "localhost:27220" }] })"
283+
mongosh "mongodb://localhost:27218" --eval "rs.initiate( { _id: 'testing', members: [ { _id: 0, host: 'localhost:27218' }, { _id: 1, host: 'localhost:27219' }, { _id: 2, host: 'localhost:27220' }] })"
284284
```
285285

286286
Create two mongoses running on ports 27017 and 27018:
@@ -289,8 +289,8 @@ The following steps will walk you through how to start and test a load balancer.
289289

290290
Initiate cluster on mongos in shell:
291291
```shell
292-
mongosh "mongodb://localhost:27017" --exec "sh.addShard("testing/localhost:27218,localhost:27219,localhost:27220")"
293-
mongosh "mongodb://localhost:27017" --exec "sh.enableSharding("test")"
292+
mongosh "mongodb://localhost:27017" --eval "sh.addShard('testing/localhost:27218,localhost:27219,localhost:27220')"
293+
mongosh "mongodb://localhost:27017" --eval "sh.enableSharding('test')"
294294
```
295295

296296
1. Create an environment variable named `MONGODB_URI` that stores the URI of the sharded cluster you just created. For example: `export MONGODB_URI="mongodb://host1,host2/"`

0 commit comments

Comments
 (0)