Skip to content

Commit ea5dff8

Browse files
committed
mockupdb, doctests, atlas
1 parent 051e733 commit ea5dff8

File tree

7 files changed

+35
-26
lines changed

7 files changed

+35
-26
lines changed

.evergreen/config.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ functions:
8787
working_dir: "src"
8888
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
8989
args:
90-
- src/.evergreen/scripts/download_and_merge_coverage.sh ${bucket_name} ${revision} ${version_id}
90+
- src/.evergreen/scripts/download-and-merge-coverage.sh ${bucket_name} ${revision} ${version_id}
9191
- command: subprocess.exec
9292
params:
9393
working_dir: "src"
@@ -267,25 +267,22 @@ functions:
267267
bash ${PROJECT_DIRECTORY}/.evergreen/run-mod-wsgi-tests.sh
268268
269269
"run mockupdb tests":
270-
- command: shell.exec
270+
- command: subprocess.exec
271271
type: test
272272
params:
273273
working_dir: "src"
274-
script: |
275-
. .evergreen/scripts/env.sh
276-
set -o xtrace
277-
export PYTHON_BINARY=${PYTHON_BINARY}
278-
bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-mockupdb
274+
binary: bash
275+
args:
276+
- .evergreen/scripts/run-mockupdb-tests.sh
279277

280278
"run doctests":
281-
- command: shell.exec
279+
- command: subprocess.exec
282280
type: test
283281
params:
284282
working_dir: "src"
285-
script: |
286-
. .evergreen/scripts/env.sh
287-
set -o xtrace
288-
PYTHON_BINARY=${PYTHON_BINARY} bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh doctest:test
283+
binary: bash
284+
args:
285+
- .evergreen/scripts/run-doctests.sh
289286

290287
"run tests":
291288
- command: shell.exec
@@ -379,20 +376,14 @@ functions:
379376
bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-eg
380377
381378
"run atlas tests":
382-
- command: shell.exec
379+
- command: subprocess.exec
383380
type: test
384381
params:
385-
include_expansions_in_env: ["DRIVERS_TOOLS", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
382+
binary: bash
383+
include_expansions_in_env: ["DRIVERS_TOOLS", "PROJECT_DIRECTORY", "PYTHON_BINARY", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
386384
working_dir: "src"
387-
script: |
388-
# Disable xtrace for security reasons (just in case it was accidentally set).
389-
set +x
390-
set -o errexit
391-
bash ${DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.sh drivers/atlas_connect
392-
PROJECT_DIRECTORY="${PROJECT_DIRECTORY}" \
393-
PYTHON_BINARY="${PYTHON_BINARY}" \
394-
TEST_ATLAS=1 \
395-
bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-eg
385+
args:
386+
- .evergreen/scripts/run-atlas-tests.sh
396387

397388
"get aws auth secrets":
398389
- command: subprocess.exec
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!bin/bash
1+
#!/bin/bash
22

3-
. src/.evergreen/scripts/env.sh
3+
. .evergreen/scripts/env.sh
44
set -o xtrace
55
mkdir out_dir
6-
find $MONGO_ORCHESTRATION_HOME -name \*.log -exec sh -c 'x="{}"; mv $x $PWD/out_dir/$(basename $(dirname $x))_$(basename $x)' \;
6+
find "$MONGO_ORCHESTRATION_HOME" -name \*.log -exec sh -c 'x="{}"; mv $x $PWD/out_dir/$(basename $(dirname $x))_$(basename $x)' \;
77
tar zcvf mongodb-logs.tar.gz -C out_dir/ .
88
rm -rf out_dir

.evergreen/scripts/run-atlas-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Disable xtrace for security reasons (just in case it was accidentally set).
4+
set +x
5+
set -o errexit
6+
bash "${DRIVERS_TOOLS}"/.evergreen/auth_aws/setup_secrets.sh drivers/atlas_connect
7+
TEST_ATLAS=1 bash "${PROJECT_DIRECTORY}"/.evergreen/hatch.sh test:test-eg

.evergreen/scripts/run-doctests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
. .evergreen/scripts/env.sh
4+
set -o xtrace
5+
PYTHON_BINARY=${PYTHON_BINARY} bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh doctest:test
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
. .evergreen/scripts/env.sh
4+
set -o xtrace
5+
export PYTHON_BINARY=${PYTHON_BINARY}
6+
bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-mockupdb

0 commit comments

Comments
 (0)