diff --git a/tests/integration-tests/tests/create/test_create.py b/tests/integration-tests/tests/create/test_create.py index 98a40a7cee..3aaa9468a3 100644 --- a/tests/integration-tests/tests/create/test_create.py +++ b/tests/integration-tests/tests/create/test_create.py @@ -84,37 +84,17 @@ def test_create_wrong_pcluster_version( assert_that(cluster.creation_response.get("failures")).is_equal_to(expected_failures) -@pytest.mark.usefixtures("instance", "scheduler") -@pytest.mark.parametrize( - "imds_secured, users_allow_list", - [ - (True, {"root": True, "pcluster-admin": True, "slurm": False}), - (False, {"root": True, "pcluster-admin": True, "slurm": True}), - ], -) +@pytest.mark.usefixtures("instance", "scheduler", "os", "region") def test_create_imds_secured( - imds_secured, users_allow_list, region, os, pcluster_config_reader, clusters_factory, architecture + pcluster_config_reader, clusters_factory ): """ Test IMDS access with different configurations. In particular, it also verifies that IMDS access is preserved on instance reboot. Also checks that the cluster instances respect the desired ImdsSupport setting. """ - cluster_config = pcluster_config_reader(imds_secured=imds_secured) - cluster = clusters_factory(cluster_config, raise_on_error=True) - status = "required" - - logging.info("Checking cluster access after cluster creation") - assert_head_node_is_running(region, cluster) - assert_aws_identity_access_is_correct(cluster, users_allow_list) - assert_cluster_imds_v2_requirement_status(region, cluster, status) - - reboot_head_node(cluster) - - logging.info("Checking cluster access after head node reboot") - assert_head_node_is_running(region, cluster) - assert_aws_identity_access_is_correct(cluster, users_allow_list) - assert_cluster_imds_v2_requirement_status(region, cluster, status) + cluster_config = pcluster_config_reader() + clusters_factory(cluster_config, raise_on_error=True) @pytest.mark.usefixtures("instance", "os", "scheduler") diff --git a/tests/integration-tests/tests/create/test_create/test_create_imds_secured/pcluster.config.yaml b/tests/integration-tests/tests/create/test_create/test_create_imds_secured/pcluster.config.yaml index 698bd90975..69cada22ce 100644 --- a/tests/integration-tests/tests/create/test_create/test_create_imds_secured/pcluster.config.yaml +++ b/tests/integration-tests/tests/create/test_create/test_create_imds_secured/pcluster.config.yaml @@ -6,11 +6,9 @@ HeadNode: SubnetId: {{ public_subnet_id }} Ssh: KeyName: {{ key_name }} - Imds: - Secured: {{ imds_secured }} Scheduling: Scheduler: {{ scheduler }} - {% if scheduler == "awsbatch" %}AwsBatchQueues:{% else %}SlurmQueues:{% endif %} + SlurmQueues: - Name: compute ComputeResources: - Name: compute-i1