Skip to content

Commit 3d87252

Browse files
committed
fixups
1 parent db9a253 commit 3d87252

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.evergreen/run-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ else
2323
echo "Missing test inputs, please run 'just setup-test'"
2424
fi
2525

26-
# Source the csfle secrets if running encryption test.
27-
if [ -n "${TEST_ENCRYPTION:-}" ]; then
28-
source $DRIVERS_TOOLS/.evergreen/csfle/secrets-export.sh
26+
# Source the local secrets export file if available.
27+
if [ -f "$ROOT_DIR/secrets-export.sh" ]; then
28+
source "$ROOT_DIR/secrets-export.sh"
2929
fi
3030

3131
PYTHON_IMPL=$(uv run python -c "import platform; print(platform.python_implementation())")

.evergreen/scripts/run-enterprise-auth-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ set -eu
55
set +x
66
# Use the default python to bootstrap secrets.
77
bash "${DRIVERS_TOOLS}"/.evergreen/secrets_handling/setup-secrets.sh drivers/enterprise_auth
8-
TEST_ENTERPRISE_AUTH=1 AUTH=auth bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-eg
8+
TEST_ENTERPRISE_AUTH=1 AUTH=auth bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test
9+
bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-eg

.evergreen/scripts/setup-tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,14 @@ def handle_test_env() -> None:
191191
MULTI_MONGOS_LB_URI += "&tls=true"
192192
write_env("SINGLE_MONGOS_LB_URI", SINGLE_MONGOS_LB_URI)
193193
write_env("MULTI_MONGOS_LB_URI", MULTI_MONGOS_LB_URI)
194+
if not DRIVERS_TOOLS:
195+
raise RuntimeError("Missing DRIVERS_TOOLS")
194196
cmd = f'bash "{DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh" start'
195197
run_command(cmd)
196198

197199
if SSL != "nossl":
200+
if not DRIVERS_TOOLS:
201+
raise RuntimeError("Missing DRIVERS_TOOLS")
198202
write_env("CLIENT_PEM", f"{DRIVERS_TOOLS}/.evergreen/x509gen/client.pem")
199203
write_env("CA_PEM", f"{DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem")
200204

@@ -231,6 +235,8 @@ def handle_test_env() -> None:
231235
# PATH is updated by configure-env.sh for access to mongocryptd.
232236

233237
if is_set("TEST_ENCRYPTION"):
238+
if not DRIVERS_TOOLS:
239+
raise RuntimeError("Missing DRIVERS_TOOLS")
234240
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/csfle/setup-secrets.sh")
235241
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/csfle/start-servers.sh")
236242

.evergreen/scripts/setup-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0})
3232
ROOT_DIR="$(dirname $(dirname $SCRIPT_DIR))"
3333

3434
# Try to source the env file.
35-
if [ -f $SCRIPT_DIR/scripts/env.sh ]; then
36-
source $SCRIPT_DIR/scripts/env.sh
35+
if [ -f $SCRIPT_DIR/env.sh ]; then
36+
source $SCRIPT_DIR/env.sh
3737
fi
3838

3939
# Source serverless secrets if applicable.

0 commit comments

Comments
 (0)