Skip to content

Commit adabd51

Browse files
committed
connectors-qa: fix connector type attribute access
1 parent 05a1512 commit adabd51

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

airbyte-ci/connectors/connectors_qa/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ poe lint
101101

102102
## Changelog
103103

104+
### 1.0.2
105+
Fix access to connector types: it should be accessed from the `Connector.connector_type` attribute.
106+
104107
### 1.0.1
105108
* Add `applies_to_connector_types` attribute to `Check` class to specify the connector types that the check applies to.
106109
* Make `CheckPublishToPyPiIsEnabled` run on source connectors only.

airbyte-ci/connectors/connectors_qa/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "connectors-qa"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
description = "A package to run QA checks on Airbyte connectors, generate reports and documentation."
55
authors = ["Airbyte <[email protected]>"]
66
readme = "README.md"

airbyte-ci/connectors/connectors_qa/src/connectors_qa/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ def run(self, connector: Connector) -> CheckResult:
147147
connector,
148148
f"Check does not apply to {connector.language.value} connectors",
149149
)
150-
if connector.type not in self.applies_to_connector_types:
150+
if connector.connector_type not in self.applies_to_connector_types:
151151
return self.skip(
152152
connector,
153-
f"Check does not apply to {connector.type} connectors",
153+
f"Check does not apply to {connector.connector_type} connectors",
154154
)
155155
return self._run(connector)
156156

airbyte-ci/connectors/connectors_qa/tests/unit_tests/test_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def test_skip_when_language_does_not_apply(self, mocker):
5353

5454
def test_skip_when_type_does_not_apply(self, mocker):
5555
# Arrange
56-
connector = mocker.MagicMock(type="destination")
56+
connector = mocker.MagicMock(connector_type="destination")
5757

5858
# Act
5959
results = []
6060
for check in ENABLED_CHECKS:
61-
if connector.type not in check.applies_to_connector_types:
61+
if connector.connector_type not in check.applies_to_connector_types:
6262
results.append(check.run(connector))
6363

6464
# Assert

0 commit comments

Comments
 (0)