Skip to content

Commit 23cafe9

Browse files
docs: invoke bash directly in test readme bash commands (#4692)
1 parent 28b8718 commit 23cafe9

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/readme.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ The actual implementations of the spec tests can be unit tests or integration te
7979

8080
## Running the Tests Locally
8181

82+
> [!NOTE]
83+
> All scripts mentioned in the readme and in drivers-evergreen-tools expect to be run in bash. These scripts will work fine in other shells so long as they're launched with the `bash` command. The outputs of these scripts also expect the user to be running in a bash syntax-like shell; users using `fish` or shells with syntax for declaring environment variables that does not look like `export <name>=<value>` may find that they need to adapt the output of the tooling to work in their shell.
84+
8285
The easiest way to get started running the tests locally is to start a replica set and run all of the integration tests.
8386

8487
Ensure the drivers tools submodule is cloned:
@@ -112,7 +115,8 @@ Then run the tests:
112115
npm run check:test
113116
```
114117

115-
> **Note:** the command above will run a subset of the tests that work with the standalone server topology since the tests are being run against a standalone server.
118+
> [!NOTE]
119+
> The command above will run a subset of the tests that work with the standalone server topology since the tests are being run against a standalone server.
116120
117121
The output will show how many tests passed, failed, and are pending. Tests that we have indicated should be skipped using `.skip()` will appear as pending in the test results. See [Mocha's documentation][mocha-skip] for more information.
118122

@@ -123,7 +127,7 @@ In the following subsections, we'll dig into the details of running the tests.
123127
By default, the integration tests run with auth-enabled and the mongo orchestration script will run with auth enabled when the `AUTH` variable is set to `auth`. Tests can be run locally without auth by setting the environment variable `AUTH` to the value of `noauth`. This must be a two-step process of starting a server without auth-enabled and then running the tests without auth-enabled.
124128

125129
```shell
126-
AUTH='noauth' TOPOLOGY='server' ./.evergreen/run-orchestration.sh
130+
AUTH='noauth' TOPOLOGY='server' bash .evergreen/run-orchestration.sh
127131
AUTH='noauth' npm run check:test
128132
```
129133
### Testing Different MongoDB Topologies
@@ -133,16 +137,16 @@ As we mentioned earlier, the tests check the topology of the MongoDB server bein
133137
In the steps above, we started a standalone server:
134138

135139
```sh
136-
TOPOLOGY='server' ./.evergreen/run-orchestration.sh
140+
TOPOLOGY='server' bash .evergreen/run-orchestration.sh
137141
```
138142

139143
You can use the same [run-orchestration.sh](.evergreen/run-orchestration.sh) script to start a replica set or sharded cluster by passing the appropriate option:
140144
```sh
141-
TOPOLOGY='replica_set' ./.evergreen/run-orchestration.sh
145+
TOPOLOGY='replica_set' bash .evergreen/run-orchestration.sh
142146
```
143147
or
144148
```sh
145-
TOPOLOGY='sharded_cluster' ./.evergreen/run-orchestration.sh
149+
TOPOLOGY='sharded_cluster' bash .evergreen/run-orchestration.sh
146150
```
147151
If you are running more than a standalone server, make sure your `ulimit` settings are in accordance with [MongoDB's recommendations][mongodb-ulimit]. Changing the settings on the latest versions of macOS can be tricky. See [this article][macos-ulimt] for tips. (You likely don't need to do the complicated `maxproc` steps.)
148152

@@ -462,7 +466,7 @@ The following steps will walk you through how to start and test a load balancer.
462466
```
463467
1. Start the load balancer by using the [run-load-balancer script](https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/run-load-balancer.sh) provided in `drivers-evergreen-tools`.
464468
```sh
465-
$DRIVERS_TOOLS/.evergreen/run-load-balancer.sh start
469+
bash $DRIVERS_TOOLS/.evergreen/run-load-balancer.sh start
466470
```
467471
A new file name `lb-expansion.yml` will be automatically created. The contents of the file will be similar in structure to the code below.
468472
```yaml
@@ -494,7 +498,7 @@ The following steps will walk you through how to start and test a load balancer.
494498
Verify that the output from Mocha includes `[ topology type: load-balanced ]`. This indicates the tests successfully accessed the specialized environment variables for load balancer testing.
495499
1. When you are done testing, shutdown the HAProxy load balancer:
496500
```sh
497-
$DRIVERS_TOOLS/.evergreen/run-load-balancer.sh stop
501+
bash $DRIVERS_TOOLS/.evergreen/run-load-balancer.sh stop
498502
```
499503

500504
### Client-Side Field-Level Encryption (CSFLE)
@@ -612,7 +616,7 @@ TODO(NODE-6698): Update deployed lambda test section.
612616
613617
You must be in an office or connected to the VPN to run these tests.
614618
615-
Run `.evergreen/run-kerberos-tests.sh`.
619+
Run `bash .evergreen/run-kerberos-tests.sh`.
616620
617621
### AWS Authentication tests
618622

0 commit comments

Comments
 (0)