@@ -743,39 +743,34 @@ def create_aws_tasks():
743
743
"env-creds" ,
744
744
"session-creds" ,
745
745
"web-identity" ,
746
+ "web-identity-session-name" ,
746
747
"ecs" ,
747
- "eks" ,
748
748
]
749
+ assume_func = FunctionCall (func = "assume ec2 role" )
749
750
for version , test_type , python in zip_cycle (get_versions_from ("4.4" ), aws_test_types , CPYTHONS ):
750
751
base_name = f"test-auth-aws-{ version } "
751
752
base_tags = ["auth-aws" ]
752
753
server_vars = dict (AUTH_AWS = "1" , VERSION = version )
753
754
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" :
757
756
python = None # noqa:PLW2901
758
- base_name = "test-auth-aws"
759
757
name = get_task_name (f"{ base_name } -{ test_type } " , python = python )
760
758
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 } " ]
761
763
test_func = FunctionCall (func = "run tests" , vars = test_vars )
762
764
funcs = [server_func , assume_func , test_func ]
763
- if test_type == "eks" :
764
- funcs = [assume_func , test_func ]
765
765
tasks .append (EvgTask (name = name , tags = tags , commands = funcs ))
766
766
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 ))
779
774
780
775
return tasks
781
776
0 commit comments