Skip to content

Commit 924adc7

Browse files
committed
cleanup
1 parent 140a494 commit 924adc7

File tree

3 files changed

+38
-13
lines changed

3 files changed

+38
-13
lines changed

.evergreen/scripts/run_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def start_server():
2929
set_env("TLS_PEM_KEY_FILE", certs / "server.pem")
3030
set_env("TLS_CA_FILE", certs / "ca.pem")
3131

32-
run_command(f"{DRIVERS_TOOLS}/.evergreen/run-orchestration.sh", cwd=DRIVERS_TOOLS)
32+
cmd = f"{DRIVERS_TOOLS.as_posix()}/.evergreen/run-orchestration.sh"
33+
run_command(cmd, cwd=DRIVERS_TOOLS)
3334

3435

3536
if __name__ == "__main__":

.evergreen/scripts/setup_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def handle_test_env() -> None:
116116
opts = get_test_options()
117117
test_name = opts.test_name
118118
sub_test_name = opts.sub_test_name
119-
AUTH = "auth" if opts.AUTH else "noauth"
120-
SSL = "ssl" if opts.SSL else "nossl"
119+
AUTH = "auth" if opts.auth else "noauth"
120+
SSL = "ssl" if opts.ssl else "nossl"
121121
TEST_ARGS = ""
122122

123123
# Start compiling the args we'll pass to uv.

CONTRIBUTING.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,29 +207,53 @@ the pages will re-render and the browser will automatically refresh.
207207

208208
## Running tests that require secrets, services, or other configuration
209209

210+
### Prerequisites
211+
210212
- Clone `drivers-evergreen-tools`:
211213
`git clone [email protected]:mongodb-labs/drivers-evergreen-tools.git`.
212214
- Run `export DRIVERS_TOOLS=$PWD/drivers-evergreen-tools`. This can be put into a `.bashrc` file
213215
for convenience.
216+
- Set up access to [Drivers test secrets](https://github.com/mongodb-labs/drivers-evergreen-tools/tree/master/.evergreen/secrets_handling#secrets-handling).
217+
218+
### Usage
219+
214220
- Run `just run-server` with optional args to set up the server.
215221
- Run `just setup-tests` with optional args to set up the test environment, secrets, etc.
216222
- Run `just run-tests` to run the tests in an appropriate Python environment.
217223
- When done, run `just teardown-tests` to clean up and `just stop-server` to stop the server.
218224

219-
## Running Load Balancer Tests Locally
225+
## Encryption tests
220226

221-
- Set up `DRIVERS_TOOLS` (see above).
222-
- Install `haproxy` (available as `brew install haproxy` on macOS).
223-
- Start the servers with `just run-server load-balancer`.
224-
- Set up the test with `just setup-tests load-balancer`.
225-
- Run the tests with `just run-tests`.
227+
- Run `just run-server` to start the server.
228+
- Run `just setup-tests encryption`.
229+
- Run the tests with `just run-tests`.
226230

227-
## Running Encryption Tests Locally
228-
- Set up `DRIVERS_TOOLS` (see above).
229-
- Run `just setup-tests` to set up the server.
230-
- Run `AWS_PROFILE=<profile> just setup-tests encryption` after setting up your AWS profile with `aws configure sso`.
231+
### Load balancer tests
232+
233+
- Install `haproxy` (available as `brew install haproxy` on macOS).
234+
- Start the server with `just run-server load_balancer`.
235+
- Set up the test with `just setup-tests load_balancer`.
231236
- Run the tests with `just run-tests`.
232237

238+
## AWS tests
239+
240+
- Run `just run-server auth_aws` to start the server.
241+
- Run `just setup-tests auth_aws <aws-test-type>` to set up the AWS test.
242+
- Run the tests with `just run-tests`.
243+
244+
## KMS tests
245+
246+
For KMS tests that are run locally, and expected to fail, in this case using `azure`:
247+
248+
- Run `just run-server`.
249+
- Run `just setup-tests kms azure-fail`.
250+
- Run `just run-tests`.
251+
252+
For KMS tests that run remotely and are expected to pass, in this case using `gcp`:
253+
254+
- Run `just setup-tests kms gcp`.
255+
- Run `just run-tests`.
256+
233257
## Enable Debug Logs
234258
- Use `-o log_cli_level="DEBUG" -o log_cli=1` with `just test` or `pytest`.
235259
- Add `log_cli_level = "DEBUG` and `log_cli = 1` to the `tool.pytest.ini_options` section in `pyproject.toml` for Evergreen patches or to enable debug logs by default on your machine.

0 commit comments

Comments
 (0)