Skip to content

Commit 435a8d3

Browse files
hanwen-clusterhanwen-pcluste
authored andcommitted
[integ-test] Skips checks in test_slurm_cli_commands for iso regions
The code doesn't know the owner IDs of vanilla AMIs in iso regions. Amazon Linux AMI still works because they have alias `amazon` Signed-off-by: Hanwen <hanwenli@amazon.com>
1 parent 6c32b68 commit 435a8d3

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

tests/integration-tests/tests/cli_commands/test_cli_commands.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,23 @@ def test_slurm_cli_commands(
4343
"""Test pcluster cli commands are working."""
4444
# Use long scale down idle time so we know nodes are terminated by pcluster stop
4545
cluster_config = pcluster_config_reader(scaledown_idletime=60)
46-
# Using custom AMI not tagged by pcluser will generate a warning
47-
custom_ami = retrieve_latest_ami(region, os, ami_type="official", architecture="x86_64")
48-
config_file = "pcluster.config.with.warnings.yaml"
49-
cluster_config_with_warning = pcluster_config_reader(config_file=config_file, custom_ami=custom_ami)
5046

51-
# Test below is not compatible with `--cluster` flag. Therefore, skip it if the flag is provided.
52-
if not request.config.getoption("cluster"):
53-
_test_create_with_warnings(cluster_config_with_warning, clusters_factory)
47+
if "alinux" not in os and "us-iso" in region: # The code does not know non-amazon vanilla AMIs IDs in iso regions
48+
# Using custom AMI not tagged by pcluser will generate a warning
49+
custom_ami = retrieve_latest_ami(region, os, ami_type="official", architecture="x86_64")
50+
config_file = "pcluster.config.with.warnings.yaml"
51+
cluster_config_with_warning = pcluster_config_reader(config_file=config_file, custom_ami=custom_ami)
52+
53+
# Test below is not compatible with `--cluster` flag. Therefore, skip it if the flag is provided.
54+
if not request.config.getoption("cluster"):
55+
_test_create_with_warnings(cluster_config_with_warning, clusters_factory)
5456

5557
cluster = _test_create_cluster(clusters_factory, cluster_config, request)
5658
_test_describe_cluster(cluster)
5759
_test_list_cluster(cluster.name, "CREATE_COMPLETE")
5860

59-
_test_update_with_warnings(cluster_config_with_warning, cluster)
61+
if "alinux" not in os and "us-iso" in region:
62+
_test_update_with_warnings(cluster_config_with_warning, cluster)
6063
check_status(cluster, "CREATE_COMPLETE", "running", "RUNNING")
6164

6265
filters = [{}, {"node_type": "HeadNode"}, {"node_type": "Compute"}, {"queue_name": "ondemand1"}]

0 commit comments

Comments
 (0)