Skip to content

Commit 0d8c317

Browse files
committed
fix language tags resolution
1 parent b0f28b7 commit 0d8c317

File tree

1 file changed

+4
-4
lines changed
  • airbyte_cdk/test/standard_tests

1 file changed

+4
-4
lines changed

airbyte_cdk/test/standard_tests/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def create_connector_test_suite(
4747
)
4848
metadata_dict: dict[str, Any] = yaml.safe_load(metadata_yaml_path.read_text())
4949
metadata_tags = metadata_dict["data"].get("tags", [])
50-
language_tag = next((tag for tag in metadata_tags if tag.startswith("language:")), None)
51-
if not language_tag:
50+
language_tags: list[str] = [tag for tag in metadata_tags if tag.startswith("language:")]
51+
if not language_tags:
5252
raise ValueError(
5353
f"Metadata YAML file '{metadata_yaml_path}' does not contain a 'language' tag. "
5454
"Please ensure the metadata file is correctly configured."
5555
f"Found tags: {', '.join(metadata_tags)}"
5656
)
57-
language = language_tag.split(":", 1)[1]
57+
language = language_tags[0].split(":")[1]
5858

5959
if language == "java":
6060
test_suite_class = DockerConnectorTestSuite
@@ -65,7 +65,7 @@ def create_connector_test_suite(
6565
elif language == "python" and connector_name.startswith("destination-"):
6666
test_suite_class = DestinationTestSuiteBase
6767
else:
68-
raise ValueError("Unsupported language for connector '{connector_name}': {language}")
68+
raise ValueError(f"Unsupported language for connector '{connector_name}': {language}")
6969

7070
subclass_overrides: dict[str, Any] = {
7171
"get_connector_root_dir": classmethod(lambda cls: connector_directory),

0 commit comments

Comments
 (0)