Skip to content

chore: use correct mongosh syntax in test setup readme #3656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ The following steps will walk you through how to start and test a load balancer.

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

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

Initiate replica set in the shell:
```shell
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" }] })"
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' }] })"
```

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

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

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/"`
Expand Down