Skip to content

Commit 7dd27f1

Browse files
committed
cleanup
1 parent b2b6934 commit 7dd27f1

File tree

4 files changed

+90
-14
lines changed

4 files changed

+90
-14
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ functions:
270270
type: test
271271
params:
272272
working_dir: "src"
273+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
273274
binary: bash
274275
args: [.evergreen/just.sh, run-tests]
275276

@@ -421,13 +422,6 @@ functions:
421422
- .evergreen/scripts/cleanup.sh
422423

423424
"teardown system":
424-
- command: subprocess.exec
425-
params:
426-
binary: bash
427-
working_dir: "src"
428-
args:
429-
# Ensure the instance profile is reassigned for aws tests.
430-
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh
431425
- command: subprocess.exec
432426
params:
433427
binary: bash

.evergreen/generated_configs/tasks.yml

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ tasks:
3939
SUB_TEST_NAME: web-identity
4040
AWS_ROLE_SESSION_NAME: test
4141
tags: [auth-aws, "4.4"]
42+
- name: test-auth-aws-ecs-4.4
43+
commands:
44+
- func: bootstrap mongo-orchestration
45+
vars:
46+
AUTH: auth
47+
ORCHESTRATION_FILE: auth-aws.json
48+
TOPOLOGY: server
49+
VERSION: "4.4"
50+
- func: run tests
51+
vars:
52+
TEST_NAME: auth_aws
53+
SUB_TEST_NAME: ecs
54+
tags: [auth-aws-ecs]
4255
- name: test-auth-aws-5.0
4356
commands:
4457
- func: bootstrap mongo-orchestration
@@ -78,6 +91,19 @@ tasks:
7891
SUB_TEST_NAME: web-identity
7992
AWS_ROLE_SESSION_NAME: test
8093
tags: [auth-aws, "5.0"]
94+
- name: test-auth-aws-ecs-5.0
95+
commands:
96+
- func: bootstrap mongo-orchestration
97+
vars:
98+
AUTH: auth
99+
ORCHESTRATION_FILE: auth-aws.json
100+
TOPOLOGY: server
101+
VERSION: "5.0"
102+
- func: run tests
103+
vars:
104+
TEST_NAME: auth_aws
105+
SUB_TEST_NAME: ecs
106+
tags: [auth-aws-ecs]
81107
- name: test-auth-aws-6.0
82108
commands:
83109
- func: bootstrap mongo-orchestration
@@ -117,6 +143,19 @@ tasks:
117143
SUB_TEST_NAME: web-identity
118144
AWS_ROLE_SESSION_NAME: test
119145
tags: [auth-aws, "6.0"]
146+
- name: test-auth-aws-ecs-6.0
147+
commands:
148+
- func: bootstrap mongo-orchestration
149+
vars:
150+
AUTH: auth
151+
ORCHESTRATION_FILE: auth-aws.json
152+
TOPOLOGY: server
153+
VERSION: "6.0"
154+
- func: run tests
155+
vars:
156+
TEST_NAME: auth_aws
157+
SUB_TEST_NAME: ecs
158+
tags: [auth-aws-ecs]
120159
- name: test-auth-aws-7.0
121160
commands:
122161
- func: bootstrap mongo-orchestration
@@ -156,6 +195,19 @@ tasks:
156195
SUB_TEST_NAME: web-identity
157196
AWS_ROLE_SESSION_NAME: test
158197
tags: [auth-aws, "7.0"]
198+
- name: test-auth-aws-ecs-7.0
199+
commands:
200+
- func: bootstrap mongo-orchestration
201+
vars:
202+
AUTH: auth
203+
ORCHESTRATION_FILE: auth-aws.json
204+
TOPOLOGY: server
205+
VERSION: "7.0"
206+
- func: run tests
207+
vars:
208+
TEST_NAME: auth_aws
209+
SUB_TEST_NAME: ecs
210+
tags: [auth-aws-ecs]
159211
- name: test-auth-aws-8.0
160212
commands:
161213
- func: bootstrap mongo-orchestration
@@ -195,6 +247,19 @@ tasks:
195247
SUB_TEST_NAME: web-identity
196248
AWS_ROLE_SESSION_NAME: test
197249
tags: [auth-aws, "8.0"]
250+
- name: test-auth-aws-ecs-8.0
251+
commands:
252+
- func: bootstrap mongo-orchestration
253+
vars:
254+
AUTH: auth
255+
ORCHESTRATION_FILE: auth-aws.json
256+
TOPOLOGY: server
257+
VERSION: "8.0"
258+
- func: run tests
259+
vars:
260+
TEST_NAME: auth_aws
261+
SUB_TEST_NAME: ecs
262+
tags: [auth-aws-ecs]
198263
- name: test-auth-aws-rapid
199264
commands:
200265
- func: bootstrap mongo-orchestration
@@ -234,6 +299,19 @@ tasks:
234299
SUB_TEST_NAME: web-identity
235300
AWS_ROLE_SESSION_NAME: test
236301
tags: [auth-aws, rapid]
302+
- name: test-auth-aws-ecs-rapid
303+
commands:
304+
- func: bootstrap mongo-orchestration
305+
vars:
306+
AUTH: auth
307+
ORCHESTRATION_FILE: auth-aws.json
308+
TOPOLOGY: server
309+
VERSION: rapid
310+
- func: run tests
311+
vars:
312+
TEST_NAME: auth_aws
313+
SUB_TEST_NAME: ecs
314+
tags: [auth-aws-ecs]
237315
- name: test-auth-aws-latest
238316
commands:
239317
- func: bootstrap mongo-orchestration
@@ -273,7 +351,7 @@ tasks:
273351
SUB_TEST_NAME: web-identity
274352
AWS_ROLE_SESSION_NAME: test
275353
tags: [auth-aws, latest]
276-
- name: test-auth-aws-ecs
354+
- name: test-auth-aws-ecs-latest
277355
commands:
278356
- func: bootstrap mongo-orchestration
279357
vars:

.evergreen/scripts/generate_config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -865,11 +865,11 @@ def create_aws_tasks():
865865
funcs = [bootstrap_func, assume_func, *test_funcs]
866866
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
867867

868-
ecs_name = "test-auth-aws-ecs"
869-
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME="ecs")
870-
ecs_func = FunctionCall(func="run tests", vars=test_vars)
871-
tags = ["auth-aws-ecs"]
872-
tasks.append(EvgTask(name=ecs_name, tags=tags, commands=[bootstrap_func, ecs_func]))
868+
tags = ["auth-aws-ecs"]
869+
name = f"test-auth-aws-ecs-{version}"
870+
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME="ecs")
871+
ecs_func = FunctionCall(func="run tests", vars=test_vars)
872+
tasks.append(EvgTask(name=name, tags=tags, commands=[bootstrap_func, ecs_func]))
873873
return tasks
874874

875875

.evergreen/scripts/teardown_tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
LOGGER.info(f"Tearing down tests of type '{TEST_NAME}'...")
1111

12-
# Shut down csfle servers if applicable
12+
# Shut down csfle servers if applicable.
1313
if TEST_NAME == "encryption":
1414
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/csfle/stop-servers.sh")
1515

@@ -23,4 +23,8 @@
2323

2424
teardown_kms(SUB_TEST_NAME)
2525

26+
# Tear down auth_aws if applicable.
27+
elif TEST_NAME == "auth_aws":
28+
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh")
29+
2630
LOGGER.info(f"Tearing down tests of type '{TEST_NAME}'... done.")

0 commit comments

Comments
 (0)