Skip to content

Commit c7c1751

Browse files
[Integ-tests] Adjust assert_subnet_az_relations_from_config for isolated regions
Some isolated regions do not have three availability zones. This commit relaxes the check for isolated regions. Signed-off-by: Hanwen <[email protected]>
1 parent e9c76ce commit c7c1751

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,12 @@ def assert_subnet_az_relations_from_config(
351351

352352
if expected_in_same_az:
353353
assert_that(set(cluster_avail_zones)).is_length(1)
354+
# If caller does not expect same az, we expect more availability zones.
355+
elif "-iso" in region:
356+
# For isolated regions, we only impose a weak check to make sure there are two or more availability zones.
357+
assert_that(len(set(cluster_avail_zones))).is_greater_than_or_equal_to(2)
354358
else:
359+
# For other regions, we impose a strong check to make sure each subnet is in a different availability zone.
355360
assert_that(len(set(cluster_avail_zones))).is_equal_to(len(cluster_avail_zones))
356361

357362

0 commit comments

Comments
 (0)