Skip to content

Commit 908102d

Browse files
authored
PYTHON-5732 Use mongodb-runner in Evergreen Tests (#2703)
1 parent edd0e06 commit 908102d

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

.evergreen/scripts/run_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def set_env(name: str, value: Any = "1") -> None:
1212

1313
def start_server():
1414
opts, extra_opts = get_test_options(
15-
"Run a MongoDB server. All given flags will be passed to run-orchestration.sh in DRIVERS_TOOLS.",
15+
"Run a MongoDB server. All given flags will be passed to run-mongodb.sh in DRIVERS_TOOLS.",
1616
require_sub_test_name=False,
1717
allow_extra_opts=True,
1818
)
@@ -51,7 +51,7 @@ def start_server():
5151
elif opts.quiet:
5252
extra_opts.append("-q")
5353

54-
cmd = ["bash", f"{DRIVERS_TOOLS}/.evergreen/run-orchestration.sh", *extra_opts]
54+
cmd = ["bash", f"{DRIVERS_TOOLS}/.evergreen/run-mongodb.sh", "start", *extra_opts]
5555
run_command(cmd, cwd=DRIVERS_TOOLS)
5656

5757

.evergreen/scripts/setup_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ def handle_test_env() -> None:
324324
version = os.environ.get("VERSION", "latest")
325325
cmd = [
326326
"bash",
327-
f"{DRIVERS_TOOLS}/.evergreen/run-orchestration.sh",
327+
f"{DRIVERS_TOOLS}/.evergreen/run-mongodb.sh",
328+
"start",
328329
"--ssl",
329330
"--version",
330331
version,

.evergreen/scripts/stop-server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Stop a server that was started using run-orchestration.sh in DRIVERS_TOOLS.
2+
# Stop a server that was started using run-mongodb.sh in DRIVERS_TOOLS.
33
set -eu
44

55
HERE=$(dirname ${BASH_SOURCE:-$0})
@@ -11,4 +11,4 @@ if [ -f $HERE/env.sh ]; then
1111
source $HERE/env.sh
1212
fi
1313

14-
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
14+
bash ${DRIVERS_TOOLS}/.evergreen/run-mongodb.sh stop

.evergreen/scripts/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Distro:
5252

5353
EXTRA_TESTS = ["mod_wsgi", "aws_lambda", "doctest"]
5454

55-
# Tests that do not use run-orchestration directly.
55+
# Tests that do not use run-mongodb directly.
5656
NO_RUN_ORCHESTRATION = [
5757
"auth_oidc",
5858
"atlas_connect",

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ the pages will re-render and the browser will automatically refresh.
197197
version of Python, set `UV_PYTHON` before running `just install`.
198198
- Ensure you have started the appropriate Mongo Server(s). You can run `just run-server` with optional args
199199
to set up the server. All given options will be passed to
200-
[`run-orchestration.sh`](https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/run-orchestration.sh). Run `$DRIVERS_TOOLS/.evergreen/run-orchestration.sh -h`
200+
[`run-mongodb.sh`](https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/run-mongodb.sh). Run `$DRIVERS_TOOLS/.evergreen/run-mongodb.sh start -h`
201201
for a full list of options.
202202
- Run `just test` or `pytest` to run all of the tests.
203203
- Append `test/<mod_name>.py::<class_name>::<test_name>` to run
@@ -396,7 +396,7 @@ To run any of the test suites with minimum supported dependencies, pass `--test-
396396

397397
- If adding new tests files that should only be run for that test suite, add a pytest marker to the file and add
398398
to the list of pytest markers in `pyproject.toml`. Then add the test suite to the `TEST_SUITE_MAP` in `.evergreen/scripts/utils.py`. If for some reason it is not a pytest-runnable test, add it to the list of `EXTRA_TESTS` instead.
399-
- If the test uses Atlas or otherwise doesn't use `run-orchestration.sh`, add it to the `NO_RUN_ORCHESTRATION` list in
399+
- If the test uses Atlas or otherwise doesn't use `run-mongodb.sh`, add it to the `NO_RUN_ORCHESTRATION` list in
400400
`.evergreen/scripts/utils.py`.
401401
- If there is something special required to run the local server or there is an extra flag that should always be set
402402
like `AUTH`, add that logic to `.evergreen/scripts/run_server.py`.

0 commit comments

Comments
 (0)