Skip to content

Commit 7591e8c

Browse files
committed
clean up aws tasks
1 parent ae6adb7 commit 7591e8c

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ tasks:
101101
AWS_ROLE_SESSION_NAME: test
102102
PYTHON_VERSION: "3.9"
103103
tags: [auth-aws, auth-aws-web-identity]
104-
- name: test-auth-aws-latest-ecs-python3.10
104+
- name: test-auth-aws-latest-regular-python3.10
105105
commands:
106106
- func: run server
107107
vars:
@@ -111,22 +111,25 @@ tasks:
111111
- func: run tests
112112
vars:
113113
TEST_NAME: auth_aws
114-
SUB_TEST_NAME: ecs
114+
SUB_TEST_NAME: regular
115115
PYTHON_VERSION: "3.10"
116-
tags: [auth-aws, auth-aws-ecs]
117-
- name: test-auth-aws-4.4-eks-python3.11
116+
tags: [auth-aws, auth-aws-regular]
117+
- name: test-auth-aws-eks
118118
commands:
119-
- func: run server
120-
vars:
121-
AUTH_AWS: "1"
122-
VERSION: "4.4"
123119
- func: assume ec2 role
124120
- func: run tests
125121
vars:
126122
TEST_NAME: auth_aws
127123
SUB_TEST_NAME: eks
128-
PYTHON_VERSION: "3.11"
129124
tags: [auth-aws, auth-aws-eks]
125+
- name: test-auth-aws-ecs
126+
commands:
127+
- func: assume ec2 role
128+
- func: run tests
129+
vars:
130+
TEST_NAME: auth_aws
131+
SUB_TEST_NAME: ecs
132+
tags: [auth-aws, auth-aws-ecs]
130133

131134
# Backport pr tests
132135
- name: backport-pr

.evergreen/scripts/generate_config.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -743,19 +743,18 @@ def create_aws_tasks():
743743
"env-creds",
744744
"session-creds",
745745
"web-identity",
746-
"ecs",
747-
"eks",
748746
]
747+
base_tags = ["auth-aws"]
748+
assume_func = FunctionCall(func="assume ec2 role")
749+
749750
for version, test_type, python in zip_cycle(get_versions_from("4.4"), aws_test_types, CPYTHONS):
750751
base_name = f"test-auth-aws-{version}"
751-
base_tags = ["auth-aws"]
752-
server_vars = dict(AUTH_AWS="1", VERSION=version)
753-
server_func = FunctionCall(func="run server", vars=server_vars)
754-
assume_func = FunctionCall(func="assume ec2 role")
755752
tags = [*base_tags, f"auth-aws-{test_type}"]
756753
name = get_task_name(f"{base_name}-{test_type}", python=python)
757754
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, PYTHON_VERSION=python)
758755
test_func = FunctionCall(func="run tests", vars=test_vars)
756+
server_vars = dict(AUTH_AWS="1", VERSION=version)
757+
server_func = FunctionCall(func="run server", vars=server_vars)
759758
funcs = [server_func, assume_func, test_func]
760759
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
761760

@@ -772,6 +771,14 @@ def create_aws_tasks():
772771
funcs = [server_func, assume_func, test_func]
773772
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
774773

774+
for test_type in ["eks", "ecs"]:
775+
name = get_task_name(f"test-auth-aws-{test_type}")
776+
tags = [*base_tags, f"auth-aws-{test_type}"]
777+
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type)
778+
test_func = FunctionCall(func="run tests", vars=test_vars)
779+
funcs = [assume_func, test_func]
780+
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
781+
775782
return tasks
776783

777784

0 commit comments

Comments
 (0)