Skip to content

Commit

Permalink
šŸ› Source Amazon Ads: test coverage more than 90% + improve test speed (ā€¦
Browse files Browse the repository at this point in the history
ā€¦#11384)

* pendulum~=1.5.1 -> pendulum~=2.1.2
* sleep_mock added
* re-organize acceptance-test-config
* SponsoredProductsReportStream.primary_key added

Signed-off-by: Sergey Chvalyuk <[email protected]>
  • Loading branch information
grubberr authored Apr 8, 2022
1 parent 83817cc commit ceef3e3
Show file tree
Hide file tree
Showing 20 changed files with 161 additions and 339 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference)
# See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/source-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-amazon-ads:dev
tests:
Expand All @@ -7,55 +7,31 @@ tests:
connection:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "secrets/config_test_account.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_products.json"
empty_streams:
[
"sponsored_product_negative_keywords",
"sponsored_product_targetings",
"sponsored_product_ads",
]
expect_records:
path: "integration_tests/expected_products_stream.txt"
extra_fields: no
exact_order: no
extra_records: yes
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/no_profiles_catalog.json"
# empty_streams:
# ["sponsored_display_product_ads", "sponsored_display_targetings"]
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_display.json"
empty_streams:
[
"sponsored_display_report_stream",
"sponsored_display_product_ads",
"sponsored_display_targetings",
]
- config_path: "secrets/config_test_account.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: ["sponsored_product_targetings"]
expect_records:
path: "integration_tests/expected_display_stream.txt"
path: "integration_tests/expected_records.txt"
extra_fields: no
exact_order: no
extra_records: yes
extra_records: no
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_brands.json"
empty_streams: ["sponsored_brands_report_stream"]
configured_catalog_path: "integration_tests/configured_catalog_sponsored_display.json"
empty_streams: ["sponsored_display_targetings"]
expect_records:
path: "integration_tests/expected_brands_stream.txt"
path: "integration_tests/expected_records_sponsored_display.txt"
extra_fields: no
exact_order: no
extra_records: yes
extra_records: no
full_refresh:
- config_path: "secrets/config_test_account.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_full_refresh.json"
# For now products report stream failing on sandbox environments with
# "Unsupported metric bidPlus" error, comment this test out.
#incremental:
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
# future_state_path: "integration_tests/future_state.json"
configured_catalog_path: "integration_tests/configured_catalog_sponsored_display.json"
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,80 @@
"stream": {
"name": "profiles",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["profileId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_brands_report_stream",
"name": "sponsored_product_campaigns",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["campaignId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_product_campaigns",
"name": "sponsored_product_ad_groups",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["adGroupId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_product_ad_groups",
"name": "sponsored_product_keywords",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["keywordId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_product_keywords",
"name": "sponsored_product_negative_keywords",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["keywordId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_product_negative_keywords",
"name": "sponsored_product_ads",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["adId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_product_targetings",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["targetId"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sponsored_products_report_stream",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"source_defined_cursor": false
"destination_sync_mode": "overwrite"
}
]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ceef3e3

Please sign in to comment.