From 704b81158e9c139c976b23c1a53a82efbe0db620 Mon Sep 17 00:00:00 2001 From: Hanwen Date: Tue, 21 Jan 2025 11:59:05 -0800 Subject: [PATCH] [integ-test] Fix test_cli_commands in iso regions This commit fixes a bug from https://github.com/aws/aws-parallelcluster/pull/6551/commits/7323faef89ee287dc6e6a13b7eda317d62367180 Signed-off-by: Hanwen --- .../integration-tests/tests/cli_commands/test_cli_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration-tests/tests/cli_commands/test_cli_commands.py b/tests/integration-tests/tests/cli_commands/test_cli_commands.py index b7defc2e2b..81ad650ee4 100644 --- a/tests/integration-tests/tests/cli_commands/test_cli_commands.py +++ b/tests/integration-tests/tests/cli_commands/test_cli_commands.py @@ -45,7 +45,7 @@ def test_slurm_cli_commands( # Use long scale down idle time so we know nodes are terminated by pcluster stop cluster_config = pcluster_config_reader(scaledown_idletime=60) - if "alinux" not in os and "us-iso" in region: # The code does not know non-amazon vanilla AMIs IDs in iso regions + if "alinux" in os or "us-iso" not in region: # The code does not know non-amazon vanilla AMIs IDs in iso regions # Using custom AMI not tagged by pcluser will generate a warning custom_ami = retrieve_latest_ami(region, os, ami_type="official", architecture="x86_64") config_file = "pcluster.config.with.warnings.yaml" @@ -59,7 +59,7 @@ def test_slurm_cli_commands( _test_describe_cluster(cluster) _test_list_cluster(cluster.name, "CREATE_COMPLETE") - if "alinux" not in os and "us-iso" in region: + if "alinux" in os or "us-iso" not in region: _test_update_with_warnings(cluster_config_with_warning, cluster) check_status(cluster, "CREATE_COMPLETE", "running", "RUNNING")