Skip to content

Commit c8087bc

Browse files
authored
remove region service exclusion and inclusion list (#2437)
remove region service exclusion and inclusion list
1 parent beb9763 commit c8087bc

File tree

3 files changed

+6
-242
lines changed

3 files changed

+6
-242
lines changed

integration/config/region_service_exclusion.yaml

Lines changed: 0 additions & 235 deletions
This file was deleted.

integration/config/region_service_inclusion.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

integration/helpers/resource.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ def _get_region():
141141
def _read_test_config_file(filename):
142142
"""Reads test inclusion or exclusion file and returns the contents"""
143143
tests_integ_dir = Path(__file__).resolve().parents[1]
144-
test_config_file_path = str(Path(tests_integ_dir, "config", filename))
145-
test_config = load_yaml(test_config_file_path)
144+
test_config_file_path = Path(tests_integ_dir, "config", filename)
145+
if not test_config_file_path.is_file():
146+
return {}
147+
test_config = load_yaml(str(test_config_file_path))
146148
return test_config
147149

148150

@@ -164,7 +166,7 @@ def current_region_does_not_support(services):
164166
region = _get_region()
165167
region_exclude_services = _read_test_config_file("region_service_exclusion.yaml")
166168

167-
if region not in region_exclude_services["regions"]:
169+
if region not in region_exclude_services.get("regions", {}):
168170
return False
169171

170172
# check if any one of the services is in the excluded services for current testing region
@@ -179,7 +181,7 @@ def current_region_not_included(services):
179181
region = _get_region()
180182
region_include_services = _read_test_config_file("region_service_inclusion.yaml")
181183

182-
if region not in region_include_services["regions"]:
184+
if region not in region_include_services.get("regions", {}):
183185
return True
184186

185187
# check if any one of the services is in the excluded services for current testing region

0 commit comments

Comments
 (0)