Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Google Search Console: enable high test strictness level in SAT #21503

Merged
merged 5 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integrat
Make sure to familiarize yourself with [pytest test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery) to know how your test files and methods should be named.
First install test dependencies into your virtual environment:
```
pip install .[tests]
pip install .'[tests]'
```
### Unit Tests
To run unit tests locally, from the connector directory run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,51 @@
# 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-google-search-console:dev
tests:
test_strictness_level: "high"
acceptance_tests:
spec:
- spec_path: "source_google_search_console/spec.json"
tests:
- spec_path: "source_google_search_console/spec.json"
connection:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "secrets/service_account_config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "secrets/service_account_config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config.json"
tests:
- config_path: "secrets/config.json"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
timeout_seconds: 1800
tests:
- config_path: "secrets/config.json"
expect_records:
path: "integration_tests/expected_records.jsonl"
extra_fields: no
exact_order: no
extra_records: yes
timeout_seconds: 1800
empty_streams:
- name: "search_analytics_all_fields"
bypass_reason: "Stream has PII data."
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/catalog.json"
timeout_seconds: 1800
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/catalog.json"
timeout_seconds: 1800
incremental:
lazebnyi marked this conversation as resolved.
Show resolved Hide resolved
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
timeout_seconds: 1800
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
search_analytics_by_country: [ "https://airbyte.io", "web", "date" ]
search_analytics_by_country: [ "https://airbyte.io", "web", "image" ]
search_analytics_by_device: [ "https://airbyte.io", "web", "date" ]
search_analytics_by_page: [ "https://airbyte.io", "web", "date" ]
search_analytics_by_query: [ "https://airbyte.io", "web", "date" ]
search_analytics_all_fields: [ "https://airbyte.io", "web", "date" ]
custom_dimensions: [ "https://airbyte.io", "web", "date" ]
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
timeout_seconds: 1800
future_state:
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
search_analytics_by_country: [ "https://airbyte.io", "web", "date" ]
search_analytics_by_country: [ "https://airbyte.io", "web", "image" ]
search_analytics_by_device: [ "https://airbyte.io", "web", "date" ]
search_analytics_by_page: [ "https://airbyte.io", "web", "date" ]
search_analytics_by_query: [ "https://airbyte.io", "web", "date" ]
search_analytics_all_fields: [ "https://airbyte.io", "web", "date" ]
custom_dimensions: [ "https://airbyte.io", "web", "date" ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
{
"streams": [
{
"stream": {
"name": "sites",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "sitemaps",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "search_analytics_by_date",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{"stream": "search_analytics_by_date", "data": {"clicks": 606, "impressions": 7632, "ctr": 0.07940251572327044, "position": 31.88456498951782, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14"}, "emitted_at": 1673994669823}
{"stream": "search_analytics_by_date", "data": {"clicks": 545, "impressions": 7643, "ctr": 0.07130707837236687, "position": 32.45505691482403, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15"}, "emitted_at": 1673994669824}
{"stream": "search_analytics_by_date", "data": {"clicks": 472, "impressions": 7556, "ctr": 0.06246691371095818, "position": 35.16079936474325, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16"}, "emitted_at": 1673994669825}
{"stream": "search_analytics_by_date", "data": {"clicks": 348, "impressions": 7252, "ctr": 0.04798676227247656, "position": 37.52137341423056, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-17"}, "emitted_at": 1673994670075}
{"stream": "search_analytics_by_date", "data": {"clicks": 168, "impressions": 6410, "ctr": 0.026209048361934478, "position": 43.134477379095166, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-18"}, "emitted_at": 1673994670075}
{"stream": "search_analytics_by_date", "data": {"clicks": 198, "impressions": 6818, "ctr": 0.029040774420651217, "position": 42.78952772073922, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-19"}, "emitted_at": 1673994670076}
{"stream": "search_analytics_by_country", "data": {"clicks": 213, "impressions": 1636, "ctr": 0.1301955990220049, "position": 24.62530562347188, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "country": "usa"}, "emitted_at": 1673994670586}
{"stream": "search_analytics_by_country", "data": {"clicks": 186, "impressions": 1790, "ctr": 0.10391061452513967, "position": 29.924022346368716, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "country": "usa"}, "emitted_at": 1673994670586}
{"stream": "search_analytics_by_country", "data": {"clicks": 148, "impressions": 1564, "ctr": 0.09462915601023018, "position": 30.83759590792839, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "country": "usa"}, "emitted_at": 1673994670586}
{"stream": "search_analytics_by_country", "data": {"clicks": 52, "impressions": 625, "ctr": 0.0832, "position": 27.408, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "country": "ind"}, "emitted_at": 1673994670587}
{"stream": "search_analytics_by_country", "data": {"clicks": 50, "impressions": 608, "ctr": 0.08223684210526316, "position": 26.820723684210527, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "country": "ind"}, "emitted_at": 1673994670587}
{"stream": "search_analytics_by_country", "data": {"clicks": 44, "impressions": 591, "ctr": 0.07445008460236886, "position": 27.43993231810491, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "country": "ind"}, "emitted_at": 1673994670587}
{"stream": "search_analytics_by_device", "data": {"clicks": 482, "impressions": 6253, "ctr": 0.07708300015992324, "position": 31.635375019990406, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "device": "DESKTOP"}, "emitted_at": 1673994671082}
{"stream": "search_analytics_by_device", "data": {"clicks": 462, "impressions": 6292, "ctr": 0.07342657342657342, "position": 31.832326764144945, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "device": "DESKTOP"}, "emitted_at": 1673994671082}
{"stream": "search_analytics_by_device", "data": {"clicks": 414, "impressions": 6225, "ctr": 0.06650602409638554, "position": 34.87839357429719, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "device": "DESKTOP"}, "emitted_at": 1673994671083}
{"stream": "search_analytics_by_device", "data": {"clicks": 123, "impressions": 1353, "ctr": 0.09090909090909091, "position": 33.38137472283814, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "device": "MOBILE"}, "emitted_at": 1673994671083}
{"stream": "search_analytics_by_device", "data": {"clicks": 83, "impressions": 1334, "ctr": 0.06221889055472264, "position": 35.52473763118441, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "device": "MOBILE"}, "emitted_at": 1673994671083}
{"stream": "search_analytics_by_device", "data": {"clicks": 57, "impressions": 1309, "ctr": 0.04354469060351413, "position": 36.913674560733384, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "device": "MOBILE"}, "emitted_at": 1673994671083}
{"stream": "search_analytics_by_page", "data": {"clicks": 415, "impressions": 2501, "ctr": 0.16593362654938024, "position": 32.60535785685725, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "page": "https://airbyte.io/"}, "emitted_at": 1673994671337}
{"stream": "search_analytics_by_page", "data": {"clicks": 367, "impressions": 2499, "ctr": 0.14685874349739897, "position": 34.94597839135654, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "page": "https://airbyte.io/"}, "emitted_at": 1673994671338}
{"stream": "search_analytics_by_page", "data": {"clicks": 309, "impressions": 2198, "ctr": 0.14058234758871702, "position": 37.05686988171065, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "page": "https://airbyte.io/"}, "emitted_at": 1673994671338}
{"stream": "search_analytics_by_page", "data": {"clicks": 31, "impressions": 341, "ctr": 0.09090909090909091, "position": 14.812316715542522, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "page": "https://airbyte.io/recipes/migrate-from-mysql-to-postgresql"}, "emitted_at": 1673994671339}
{"stream": "search_analytics_by_page", "data": {"clicks": 25, "impressions": 337, "ctr": 0.07418397626112759, "position": 11.57566765578635, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "page": "https://airbyte.io/recipes/migrate-from-mysql-to-postgresql"}, "emitted_at": 1673994671339}
{"stream": "search_analytics_by_page", "data": {"clicks": 22, "impressions": 760, "ctr": 0.02894736842105263, "position": 2.375, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "page": "https://airbyte.io/pricing"}, "emitted_at": 1673994671340}
{"stream": "search_analytics_by_query", "data": {"clicks": 368, "impressions": 560, "ctr": 0.6571428571428571, "position": 1, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "query": "airbyte"}, "emitted_at": 1673994672096}
{"stream": "search_analytics_by_query", "data": {"clicks": 319, "impressions": 486, "ctr": 0.6563786008230452, "position": 1.0041152263374487, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "query": "airbyte"}, "emitted_at": 1673994672096}
{"stream": "search_analytics_by_query", "data": {"clicks": 258, "impressions": 419, "ctr": 0.6157517899761337, "position": 1, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "query": "airbyte"}, "emitted_at": 1673994672097}
{"stream": "search_analytics_by_query", "data": {"clicks": 8, "impressions": 12, "ctr": 0.6666666666666666, "position": 1.3333333333333333, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "query": "airbite"}, "emitted_at": 1673994672097}
{"stream": "search_analytics_by_query", "data": {"clicks": 7, "impressions": 11, "ctr": 0.6363636363636364, "position": 1, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "query": "airbyte cloud"}, "emitted_at": 1673994672097}
{"stream": "search_analytics_by_query", "data": {"clicks": 7, "impressions": 13, "ctr": 0.5384615384615384, "position": 1, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "query": "airbytes"}, "emitted_at": 1673994672097}
{"stream": "custom_dimensions", "data": {"clicks": 153, "impressions": 1497, "ctr": 0.10220440881763528, "position": 29.36005344021376, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "country": "usa", "device": "DESKTOP"}, "emitted_at": 1673994673896}
{"stream": "custom_dimensions", "data": {"clicks": 144, "impressions": 1308, "ctr": 0.11009174311926606, "position": 25.412079510703364, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "country": "usa", "device": "DESKTOP"}, "emitted_at": 1673994673896}
{"stream": "custom_dimensions", "data": {"clicks": 131, "impressions": 1304, "ctr": 0.1004601226993865, "position": 30.555981595092025, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-16", "country": "usa", "device": "DESKTOP"}, "emitted_at": 1673994673897}
{"stream": "custom_dimensions", "data": {"clicks": 68, "impressions": 316, "ctr": 0.21518987341772153, "position": 22.227848101265824, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "country": "usa", "device": "MOBILE"}, "emitted_at": 1673994673897}
{"stream": "custom_dimensions", "data": {"clicks": 44, "impressions": 483, "ctr": 0.09109730848861283, "position": 26.467908902691512, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-14", "country": "ind", "device": "DESKTOP"}, "emitted_at": 1673994673898}
{"stream": "custom_dimensions", "data": {"clicks": 40, "impressions": 469, "ctr": 0.08528784648187633, "position": 27.658848614072493, "site_url": "https://airbyte.io/", "search_type": "web", "date": "2021-09-15", "country": "ind", "device": "DESKTOP"}, "emitted_at": 1673994673898}
{"stream": "sites", "data": {"siteUrl": "https://airbyte.io/", "permissionLevel": "siteOwner"}, "emitted_at": 1673994968928}
{"stream": "sites", "data": {"siteUrl": "https://airbyte.io/", "permissionLevel": "siteOwner"}, "emitted_at": 1673994969028}
{"stream": "sitemaps", "data": {"path": "https://airbyte.io/sitemap.xml", "lastSubmitted": "2021-09-10T23:02:22.258Z", "isPending": false, "isSitemapsIndex": false, "type": "sitemap", "lastDownloaded": "2023-01-17T03:42:03.548Z", "warnings": "0", "errors": "0", "contents": [{"type": "web", "submitted": "5683", "indexed": "0"}]}, "emitted_at": 1673995005172}
{"stream": "sitemaps", "data": {"path": "https://airbyte.io/sitemap.xml", "lastSubmitted": "2021-09-10T23:02:22.258Z", "isPending": false, "isSitemapsIndex": false, "type": "sitemap", "lastDownloaded": "2023-01-17T03:42:03.548Z", "warnings": "0", "errors": "0", "contents": [{"type": "web", "submitted": "5683", "indexed": "0"}]}, "emitted_at": 1673995005276}