diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/fdc8b827-3257-4b33-83cc-106d234c34d4.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/fdc8b827-3257-4b33-83cc-106d234c34d4.json index 9fdd76d2d567..d499cfc99bfa 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/fdc8b827-3257-4b33-83cc-106d234c34d4.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/fdc8b827-3257-4b33-83cc-106d234c34d4.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "fdc8b827-3257-4b33-83cc-106d234c34d4", "name": "Google Adwords (Deprecated)", "dockerRepository": "airbyte/source-google-adwords-singer", - "dockerImageTag": "0.2.3", + "dockerImageTag": "0.2.5", "documentationUrl": "https://hub.docker.com/r/airbyte/source-google-adwords-singer", "icon": "google-adwords.svg" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 1903036841d0..0fa8016bc473 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -28,7 +28,7 @@ - sourceDefinitionId: fdc8b827-3257-4b33-83cc-106d234c34d4 name: Google Adwords (Deprecated) dockerRepository: airbyte/source-google-adwords-singer - dockerImageTag: 0.2.3 + dockerImageTag: 0.2.5 documentationUrl: https://hub.docker.com/r/airbyte/source-google-adwords-singer icon: google-adwords.svg - sourceDefinitionId: ef69ef6e-aa7f-4af1-a01d-ef775033524e diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/Dockerfile b/airbyte-integrations/connectors/source-google-adwords-singer/Dockerfile index 1b80990e676d..9ecad9d224ec 100644 --- a/airbyte-integrations/connectors/source-google-adwords-singer/Dockerfile +++ b/airbyte-integrations/connectors/source-google-adwords-singer/Dockerfile @@ -12,5 +12,5 @@ COPY setup.py ./ RUN pip install tap-adwords==1.12.0 RUN pip install . -LABEL io.airbyte.version=0.2.3 +LABEL io.airbyte.version=0.2.5 LABEL io.airbyte.name=airbyte/source-google-adwords-singer diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/acceptance-test-config.yml b/airbyte-integrations/connectors/source-google-adwords-singer/acceptance-test-config.yml new file mode 100644 index 000000000000..51a76f934f45 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-adwords-singer/acceptance-test-config.yml @@ -0,0 +1,21 @@ +connector_image: airbyte/source-google-adwords-singer:dev +tests: + spec: + - spec_path: "source_google_adwords_singer/spec.json" + connection: + - config_path: "secrets/config.json" + status: "succeed" + - config_path: "integration_tests/invalid_config.json" + status: "failed" + discovery: + - config_path: "secrets/config.json" + basic_read: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + validate_output_from_all_streams: yes + full_refresh: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + +# incremental tests are disabled due to unsupported state structure in current tests +# required structure: {stream_name: cursor_value} given {‘bookmarks’: {stream_name: cursor_value}} diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/build.gradle b/airbyte-integrations/connectors/source-google-adwords-singer/build.gradle index 92b5ef9aeff2..c62be5100950 100644 --- a/airbyte-integrations/connectors/source-google-adwords-singer/build.gradle +++ b/airbyte-integrations/connectors/source-google-adwords-singer/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id 'airbyte-python' id 'airbyte-docker' - id 'airbyte-standard-source-test-file' + id 'airbyte-source-acceptance-test' } airbytePython { @@ -11,20 +11,6 @@ airbytePython { dependencies { - implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) + implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs) implementation files(project(':airbyte-integrations:bases:base-singer').airbyteDocker.outputs) } - -// used to allow local iteration to work -task('installSingerTap', type: PythonTask) { - module = "pip" - command = "install tap-adwords==1.12.0" -} -installReqs.dependsOn installSingerTap - -airbyteStandardSourceTestFile { - // For more information on standard source tests, see https://docs.airbyte.io/contributing-to-airbyte/building-new-connector/testing-connectors - specPath = "source_google_adwords_singer/spec.json" - configPath = "secrets/config.json" - configuredCatalogPath = "sample_files/configured_catalog.json" -} diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/__init__.py b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/acceptance.py new file mode 100644 index 000000000000..d98ac8aa3a1c --- /dev/null +++ b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/acceptance.py @@ -0,0 +1,36 @@ +# +# MIT License +# +# Copyright (c) 2020 Airbyte +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + + +import pytest + +pytest_plugins = ("source_acceptance_test.plugin",) + + +@pytest.fixture(scope="session", autouse=True) +def connector_setup(): + """This fixture is a placeholder for external resources that acceptance test might require.""" + # TODO: setup test dependencies + yield + # TODO: clean up test dependencies diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/configured_catalog.json similarity index 96% rename from airbyte-integrations/connectors/source-google-adwords-singer/sample_files/configured_catalog.json rename to airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/configured_catalog.json index fc2a24f9859a..1d899d473555 100644 --- a/airbyte-integrations/connectors/source-google-adwords-singer/sample_files/configured_catalog.json +++ b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/configured_catalog.json @@ -167,11 +167,9 @@ } } }, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": [], "destination_sync_mode": "overwrite" }, { @@ -321,11 +319,9 @@ } } }, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": [], "destination_sync_mode": "overwrite" }, { @@ -402,11 +398,9 @@ } } }, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": [], "destination_sync_mode": "overwrite" }, { @@ -435,11 +429,9 @@ }, "type": ["null", "object"] }, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": [], "destination_sync_mode": "overwrite" } ] diff --git a/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/invalid_config.json new file mode 100644 index 000000000000..5e7dcdaa27f8 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/invalid_config.json @@ -0,0 +1,9 @@ +{ + "developer_token": "hahaha", + "oauth_client_id": "notvalid.apps.googleusercontent.com", + "oauth_client_secret": "notasecret", + "refresh_token": "1//notarefrshtoken", + "customer_ids": ["0000000000"], + "start_date": "2020-06-01T00:00:00Z", + "user_agent": "unknown" +} diff --git a/docs/integrations/sources/google-adwords.md b/docs/integrations/sources/google-adwords.md index e06b49b688fa..bc689e0ede5a 100644 --- a/docs/integrations/sources/google-adwords.md +++ b/docs/integrations/sources/google-adwords.md @@ -60,3 +60,9 @@ When you apply for a token, you need to mention: If for any reason the request gets denied, let us know and we will be able to unblock you. + +## Changelog + +| Version | Date | Pull Request | Subject | +| :------ | :-------- | :----- | :------ | +| 0.1.2 | 2021-06-25 | [4205](https://github.com/airbytehq/airbyte/pull/4205) | Set up CDK SAT tests. Incremental tests are disabled due to unsupported state structure in current tests: required structure: {stream_name: cursor_value} given {‘bookmarks’: {stream_name: cursor_value}} |