Skip to content

Commit bac6277

Browse files
committed
cleanup
1 parent f3dc0a7 commit bac6277

File tree

3 files changed

+22
-28
lines changed

3 files changed

+22
-28
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,26 @@ tasks:
8787
SUB_TEST_NAME: web-identity
8888
PYTHON_VERSION: "3.9"
8989
tags: [auth-aws, auth-aws-web-identity]
90-
- name: test-auth-aws-rapid-web-identity-session-name-python3.9
90+
- name: test-auth-aws-latest-web-identity-session-name-python3.10
9191
commands:
9292
- func: run server
9393
vars:
9494
AUTH_AWS: "1"
95-
VERSION: rapid
95+
VERSION: latest
9696
- func: assume ec2 role
9797
- func: run tests
9898
vars:
9999
TEST_NAME: auth_aws
100-
SUB_TEST_NAME: web-identity
100+
SUB_TEST_NAME: web-identity-session-name
101+
PYTHON_VERSION: "3.10"
101102
AWS_ROLE_SESSION_NAME: test
102-
PYTHON_VERSION: "3.9"
103103
tags: [auth-aws, auth-aws-web-identity]
104-
- name: test-auth-aws-ecs
104+
- name: test-auth-aws-4.4-ecs
105105
commands:
106106
- func: run server
107107
vars:
108108
AUTH_AWS: "1"
109-
VERSION: latest
109+
VERSION: "4.4"
110110
- func: assume ec2 role
111111
- func: run tests
112112
vars:
@@ -121,7 +121,6 @@ tasks:
121121
vars:
122122
TEST_NAME: auth_aws
123123
SUB_TEST_NAME: eks
124-
PYTHON_VERSION: null
125124
tags: [auth-aws, auth-aws-eks]
126125

127126
# Backport pr tests

.evergreen/scripts/generate_config.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -743,39 +743,34 @@ def create_aws_tasks():
743743
"env-creds",
744744
"session-creds",
745745
"web-identity",
746+
"web-identity-session-name",
746747
"ecs",
747-
"eks",
748748
]
749+
assume_func = FunctionCall(func="assume ec2 role")
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}"
751752
base_tags = ["auth-aws"]
752753
server_vars = dict(AUTH_AWS="1", VERSION=version)
753754
server_func = FunctionCall(func="run server", vars=server_vars)
754-
assume_func = FunctionCall(func="assume ec2 role")
755-
tags = [*base_tags, f"auth-aws-{test_type}"]
756-
if test_type in ["eks", "ecs"]:
755+
if test_type == "ecs":
757756
python = None # noqa:PLW2901
758-
base_name = "test-auth-aws"
759757
name = get_task_name(f"{base_name}-{test_type}", python=python)
760758
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, PYTHON_VERSION=python)
759+
if test_type == "web-identity-session-name":
760+
test_type = "web-identity" # noqa:PLW2901
761+
test_vars["AWS_ROLE_SESSION_NAME"] = "test"
762+
tags = [*base_tags, f"auth-aws-{test_type}"]
761763
test_func = FunctionCall(func="run tests", vars=test_vars)
762764
funcs = [server_func, assume_func, test_func]
763-
if test_type == "eks":
764-
funcs = [assume_func, test_func]
765765
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
766766

767-
if test_type == "web-identity":
768-
tags = [*base_tags, "auth-aws-web-identity"]
769-
name = get_task_name(f"{base_name}-web-identity-session-name", python=python)
770-
test_vars = dict(
771-
TEST_NAME="auth_aws",
772-
SUB_TEST_NAME="web-identity",
773-
AWS_ROLE_SESSION_NAME="test",
774-
PYTHON_VERSION=python,
775-
)
776-
test_func = FunctionCall(func="run tests", vars=test_vars)
777-
funcs = [server_func, assume_func, test_func]
778-
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
767+
# The EKS test does not start a server
768+
tags = ["auth-aws", "auth-aws-eks"]
769+
name = get_task_name("test-auth-aws-eks")
770+
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME="eks")
771+
test_func = FunctionCall(func="run tests", vars=test_vars)
772+
funcs = [assume_func, test_func]
773+
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
779774

780775
return tasks
781776

.evergreen/scripts/run-aws-container-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ set -o xtrace
2222
# Install python with pip.
2323
PYTHON_VER="python3.11"
2424
apt-get -qq update < /dev/null > /dev/null
25-
apt-get -qq install software-properties-common -y # needed for apt-add-repository
26-
add-apt-repository -qq ppa:deadsnakes/ppa -y
25+
apt-get -qq install software-properties-common -y < /dev/null > /dev/null # needed for apt-add-repository
26+
add-apt-repository -ppa:deadsnakes/ppa -y
2727
apt-get -qq update < /dev/null > /dev/null
2828
apt-get -qq install $PYTHON_VER $PYTHON_VER-venv build-essential $PYTHON_VER-dev -y < /dev/null > /dev/null
2929

0 commit comments

Comments
 (0)