Skip to content

Commit d3ae744

Browse files
committed
handle case of declared category with no 'tests' (usually 'bypass_reason' exists)
1 parent 2f11bfa commit d3ae744

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

airbyte_cdk/test/standard_tests/connector_base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,12 @@ def get_scenarios(
154154
f"Acceptance tests config not found in {cls.acceptance_test_config_path}."
155155
f" Found only: {str(all_tests_config)}."
156156
)
157-
if category not in all_tests_config["acceptance_tests"]:
157+
158+
if (
159+
category not in all_tests_config["acceptance_tests"]
160+
or "tests" not in all_tests_config["acceptance_tests"][category]
161+
):
158162
return []
159-
if "tests" not in all_tests_config["acceptance_tests"][category]:
160-
raise ValueError(f"No tests found for category {category}")
161163

162164
tests_scenarios = [
163165
ConnectorTestScenario.model_validate(test)

0 commit comments

Comments
 (0)