Skip to content

Commit 7644696

Browse files
committed
PYTHON-5217 Update Atlas Data Lake tests
1 parent 1d866b3 commit 7644696

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -213,20 +213,6 @@ functions:
213213
params:
214214
file: ${DRIVERS_TOOLS}/mo-expansion.yml
215215

216-
"bootstrap data lake":
217-
- command: subprocess.exec
218-
type: setup
219-
params:
220-
binary: bash
221-
args:
222-
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
223-
- command: subprocess.exec
224-
type: setup
225-
params:
226-
binary: bash
227-
args:
228-
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
229-
230216
"run doctests":
231217
- command: subprocess.exec
232218
type: test
@@ -404,13 +390,6 @@ tasks:
404390
TOPOLOGY: "replica_set"
405391
- func: "run tests"
406392

407-
- name: atlas-data-lake-tests
408-
commands:
409-
- func: "bootstrap data lake"
410-
- func: "run tests"
411-
vars:
412-
TEST_NAME: "data_lake"
413-
414393
- name: "test-aws-lambda-deployed"
415394
commands:
416395
- command: ec2.assume_role

.evergreen/scripts/configure-env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ EOT
7777
# Write the .env file for drivers-tools.
7878
rm -rf $DRIVERS_TOOLS
7979
BRANCH=master
80+
BRANCH=PYTHON-5217
8081
ORG=mongodb-labs
82+
ORG=blink1073
8183
git clone --branch $BRANCH https://github.com/$ORG/drivers-evergreen-tools.git $DRIVERS_TOOLS
8284

8385
cat <<EOT > ${DRIVERS_TOOLS}/.env

.evergreen/scripts/generate_config.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def create_atlas_data_lake_variants():
601601
variants = []
602602
host = HOSTS["ubuntu22"]
603603
for python, c_ext in product(MIN_MAX_PYTHON, C_EXTS):
604-
tasks = ["atlas-data-lake-tests"]
604+
tasks = [".atlas_data_lake"]
605605
expansions = dict(AUTH="auth")
606606
handle_c_ext(c_ext, expansions)
607607
display_name = get_display_name("Atlas Data Lake", host, python=python, **expansions)
@@ -970,6 +970,14 @@ def create_perf_tasks():
970970
return tasks
971971

972972

973+
def create_atlas_data_lake_tasks():
974+
vars = dict(TEST_NAME="data_lake")
975+
test_func = FunctionCall(func="run tests", vars=vars)
976+
task_name = "test-atlas-data-lake"
977+
tags = ["atlas_data_lake"]
978+
return [EvgTask(name=task_name, tags=tags, commands=[test_func])]
979+
980+
973981
def create_ocsp_tasks():
974982
tasks = []
975983
tests = [

.evergreen/scripts/setup_tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ def handle_test_env() -> None:
175175
if not config:
176176
AUTH = "noauth"
177177

178+
if test_name == "data_lake":
179+
run_command(f"{DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh")
180+
run_command(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/setup.sh")
181+
AUTH = "auth"
182+
178183
if AUTH != "noauth":
179184
if test_name == "data_lake":
180185
config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh")

.evergreen/scripts/teardown_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757

5858
teardown_mod_wsgi()
5959

60+
# Tear down data_lake if applicable.
61+
elif TEST_NAME == "data_lake":
62+
run_command(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/teardown.sh")
63+
6064
# Tear down coverage if applicable.
6165
if os.environ.get("COVERAGE"):
6266
shutil.rmtree(".pytest_cache", ignore_errors=True)

0 commit comments

Comments
 (0)