Skip to content

Commit 60376b8

Browse files
committed
cleanup
1 parent 9f8d879 commit 60376b8

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.evergreen/scripts/setup_tests.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,19 @@ def handle_test_env() -> None:
240240
run_command(cmd)
241241

242242
if test_name == "ocsp":
243-
for name in ["OCSP_SERVER_TYPE", "OCSP_ALGORITHM"]:
243+
if sub_test_name:
244+
os.environ["OCSP_SERVER_TYPE"] = sub_test_name
245+
for name in ["OCSP_SERVER_TYPE", "ORCHESTRATION_FILE"]:
244246
if name not in os.environ:
245247
raise ValueError(f"Please set {name}")
246248
server_type = os.environ["OCSP_SERVER_TYPE"]
247249
should_succeed = "true" if "valid" in server_type else "false"
248250
write_env("OCSP_TLS_SHOULD_SUCCEED", should_succeed)
249-
ocsp_algo = os.environ["OCSP_ALGORITHM"]
250-
write_env("CA_FILE", f"{{DRIVERS_TOOLS}}/.evergreen/ocsp/{ocsp_algo}/ca.pem")
251+
ocsp_algo = os.environ["ORCHESTRATION_FILE"].split("-")[0]
252+
write_env("CA_FILE", f"{DRIVERS_TOOLS}/.evergreen/ocsp/{ocsp_algo}/ca.pem")
251253
env = os.environ.copy()
252254
env["SERVER_TYPE"] = server_type
255+
env["OCSP_ALGORITHM"] = ocsp_algo
253256
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/ocsp/setup.sh", env=env)
254257

255258
if SSL != "nossl":

CONTRIBUTING.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ the pages will re-render and the browser will automatically refresh.
218218
### Usage
219219

220220
- Run `just run-server` with optional args to set up the server.
221-
All given flags will be passed to `run-orchestration.sh` in `DRIVERS_TOOLS`.
221+
All given flags will be passed to `run-orchestration.sh` in `$DRIVERS_TOOLS`.
222222
- Run `just setup-tests` with optional args to set up the test environment, secrets, etc.
223223
- Run `just run-tests` to run the tests in an appropriate Python environment.
224224
- When done, run `just teardown-tests` to clean up and `just stop-server` to stop the server.
225225

226-
## Encryption tests
226+
### Encryption tests
227227

228228
- Run `just run-server` to start the server.
229229
- Run `just setup-tests encryption`.
@@ -236,13 +236,13 @@ the pages will re-render and the browser will automatically refresh.
236236
- Set up the test with `just setup-tests load_balancer`.
237237
- Run the tests with `just run-tests`.
238238

239-
## AWS tests
239+
### AWS tests
240240

241241
- Run `just run-server auth_aws` to start the server.
242242
- Run `just setup-tests auth_aws <aws-test-type>` to set up the AWS test.
243243
- Run the tests with `just run-tests`.
244244

245-
## KMS tests
245+
### KMS tests
246246

247247
For KMS tests that are run locally, and expected to fail, in this case using `azure`:
248248

@@ -255,6 +255,15 @@ For KMS tests that run remotely and are expected to pass, in this case using `gc
255255
- Run `just setup-tests kms gcp`.
256256
- Run `just run-tests`.
257257

258+
### OCSP tests
259+
260+
- Export the algorithm, e.g. `export ORCHESTRATION_FILE=rsa-basic-tls-ocsp-mustStaple.json`.
261+
This corresponds to a config file in `$DRIVERS_TOOLS/.evergreen/orchestration/configs/servers`.
262+
Only the rsa algorithm works on MacOS.
263+
- Run `just run-server ocsp`.
264+
- Run `just setup-tests ocsp valid` (options are "valid", "revoked", "valid-delegate", "revoked-delegate").
265+
- Run `just run-tests`
266+
258267
## Enable Debug Logs
259268
- Use `-o log_cli_level="DEBUG" -o log_cli=1` with `just test` or `pytest`.
260269
- 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)