Skip to content

Commit 453ab6d

Browse files
committed
[Test] Fix the AWS domain used for FSx resources.
Signed-off-by: Giacomo Marciani <mgiacomo@amazon.com>
1 parent b6c0103 commit 453ab6d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/integration-tests/tests/storage/storage_common.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from utils import generate_stack_name, random_alphanumeric, retrieve_cfn_outputs
3434

3535
from tests.common.schedulers_common import SlurmCommands
36-
from tests.common.utils import get_aws_domain, retrieve_latest_ami
36+
from tests.common.utils import CLASSIC_AWS_DOMAIN, get_aws_domain, retrieve_latest_ami
3737

3838

3939
def get_cluster_subnet_ids_groups(cluster: Cluster, scheduler: str, include_head_node: bool = True):
@@ -675,11 +675,20 @@ def assert_fsx_lustre_correctly_mounted(
675675
mount_name=mount_name,
676676
mount_dir=mount_dir,
677677
mount_options=mount_options,
678-
aws_domain_regex=re.escape(get_aws_domain(region)),
678+
aws_domain_regex=re.escape(get_aws_domain_for_fsx(region)),
679679
),
680680
)
681681

682682

683+
def get_aws_domain_for_fsx(region):
684+
# Return the AWS domain for FSx resources.
685+
# Notice that China and GovCloud use the Commercial domain.
686+
if "us-iso" in region:
687+
return get_aws_domain(region)
688+
else:
689+
return CLASSIC_AWS_DOMAIN
690+
691+
683692
def get_mount_name(fsx_fs_id, region):
684693
fsx = boto3.client("fsx", region_name=region)
685694
if fsx_fs_id.startswith("fc-"):

0 commit comments

Comments
 (0)