From b8157062e1c16a169219cf58172467af3ad70fd8 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Wed, 18 May 2022 16:40:41 -0400 Subject: [PATCH] SAT: fix `AirbyteTraceMessage` case by using invalid sync mode (#12960) * cause failure by using invalid sync mode * create configured stream without passing pydantic validation * fix formatting * bump version, update changelog --- .../bases/source-acceptance-test/CHANGELOG.md | 3 +++ .../bases/source-acceptance-test/Dockerfile | 2 +- .../source_acceptance_test/tests/test_core.py | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/airbyte-integrations/bases/source-acceptance-test/CHANGELOG.md b/airbyte-integrations/bases/source-acceptance-test/CHANGELOG.md index 91741232377e..f04517de4c98 100644 --- a/airbyte-integrations/bases/source-acceptance-test/CHANGELOG.md +++ b/airbyte-integrations/bases/source-acceptance-test/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.1.54 +Fixed `AirbyteTraceMessage` test case to make connectors fail more reliably. + ## 0.1.53 Add more granular incremental testing that walks through syncs and verifies records according to cursor value. diff --git a/airbyte-integrations/bases/source-acceptance-test/Dockerfile b/airbyte-integrations/bases/source-acceptance-test/Dockerfile index 0a4568869a17..b248478eddd4 100644 --- a/airbyte-integrations/bases/source-acceptance-test/Dockerfile +++ b/airbyte-integrations/bases/source-acceptance-test/Dockerfile @@ -33,7 +33,7 @@ COPY pytest.ini setup.py ./ COPY source_acceptance_test ./source_acceptance_test RUN pip install . -LABEL io.airbyte.version=0.1.53 +LABEL io.airbyte.version=0.1.54 LABEL io.airbyte.name=airbyte/source-acceptance-test ENTRYPOINT ["python", "-m", "pytest", "-p", "source_acceptance_test.plugin", "-r", "fEsx"] diff --git a/airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py b/airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py index f9e2316520f6..a5feda925317 100644 --- a/airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py +++ b/airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py @@ -19,7 +19,6 @@ ConfiguredAirbyteCatalog, ConfiguredAirbyteStream, ConnectorSpecification, - DestinationSyncMode, Status, SyncMode, TraceType, @@ -419,14 +418,15 @@ def test_airbyte_trace_message_on_failure(self, connector_config, inputs: BasicR invalid_configured_catalog = ConfiguredAirbyteCatalog( streams=[ - ConfiguredAirbyteStream( + # create ConfiguredAirbyteStream without validation + ConfiguredAirbyteStream.construct( stream=AirbyteStream( name="__AIRBYTE__stream_that_does_not_exist", json_schema={"type": "object", "properties": {"f1": {"type": "string"}}}, supported_sync_modes=[SyncMode.full_refresh], ), - sync_mode=SyncMode.full_refresh, - destination_sync_mode=DestinationSyncMode.overwrite, + sync_mode="INVALID", + destination_sync_mode="INVALID", ) ] )