Skip to content

Commit

Permalink
SAT: skip backward compatibility tests on spec/catalog if previous an…
Browse files Browse the repository at this point in the history
…d actual spec/catalog are identical (#20435)
  • Loading branch information
alafanechere authored Dec 14, 2022
1 parent 88c652e commit 4017c0a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.2.23
Skip backward compatibility tests on specifications if actual and previous specifications and discovered catalogs are identical.[#20435](https://github.com/airbytehq/airbyte/pull/20435)

## 0.2.22
Capture control messages to store and use updated configurations. [#19979](https://github.com/airbytehq/airbyte/pull/19979).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COPY pytest.ini setup.py ./
COPY source_acceptance_test ./source_acceptance_test
RUN pip install .

LABEL io.airbyte.version=0.2.22
LABEL io.airbyte.version=0.2.23
LABEL io.airbyte.name=airbyte/source-acceptance-test

ENTRYPOINT ["python", "-m", "pytest", "-p", "source_acceptance_test.plugin", "-r", "fEsx"]
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,16 @@ class TestSpec(BaseTest):
previous_spec_cache: ConnectorSpecification = None

@pytest.fixture(name="skip_backward_compatibility_tests")
def skip_backward_compatibility_tests_fixture(self, inputs: SpecTestConfig, previous_connector_docker_runner: ConnectorRunner) -> bool:
def skip_backward_compatibility_tests_fixture(
self,
inputs: SpecTestConfig,
previous_connector_docker_runner: ConnectorRunner,
previous_connector_spec: ConnectorSpecification,
actual_connector_spec: ConnectorSpecification,
) -> bool:
if actual_connector_spec == previous_connector_spec:
pytest.skip("The previous and actual specifications are identical.")

if previous_connector_docker_runner is None:
pytest.skip("The previous connector image could not be retrieved.")

Expand Down Expand Up @@ -358,8 +367,15 @@ def test_check(self, connector_config, inputs: ConnectionTestConfig, docker_runn
class TestDiscovery(BaseTest):
@pytest.fixture(name="skip_backward_compatibility_tests")
def skip_backward_compatibility_tests_fixture(
self, inputs: DiscoveryTestConfig, previous_connector_docker_runner: ConnectorRunner
self,
inputs: DiscoveryTestConfig,
previous_connector_docker_runner: ConnectorRunner,
discovered_catalog: MutableMapping[str, AirbyteStream],
previous_discovered_catalog: MutableMapping[str, AirbyteStream],
) -> bool:
if discovered_catalog == previous_discovered_catalog:
pytest.skip("The previous and actual discovered catalogs are identical.")

if previous_connector_docker_runner is None:
pytest.skip("The previous connector image could not be retrieved.")

Expand Down

0 comments on commit 4017c0a

Please sign in to comment.