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 LinkedIn-Ads: update SAT to high strictness level #20964

Merged
merged 5 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -81,7 +81,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,25 +1,40 @@
# See [Source Acceptance Tests](https://docs.airbyte.com/contributing-to-airbyte/building-new-connector/source-acceptance-tests)
# for more information about how to configure these tests
connector_image: airbyte/source-linkedin-ads:dev
tests:
test_strictness_level: high
acceptance_tests:
spec:
- spec_path: "source_linkedin_ads/spec.json"
tests:
- spec_path: "source_linkedin_ads/spec.json"
connection:
- config_path: "secrets/config_oauth.json"
status: "succeed"
timeout_seconds: 60
- config_path: "integration_tests/invalid_config.json"
status: "failed"
tests:
- config_path: "secrets/config_oauth.json"
status: "succeed"
timeout_seconds: 60
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config_oauth.json"
timeout_seconds: 60
tests:
- config_path: "secrets/config_oauth.json"
timeout_seconds: 60
basic_read:
- config_path: "secrets/config_oauth.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
tests:
- config_path: "secrets/config_oauth.json"
expect_records:
path: "integration_tests/expected_records.txt"
incremental:
- config_path: "secrets/config_oauth.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
tests:
- config_path: "secrets/config_oauth.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
missing_streams:
- name: accounts
bypass_reason: "This stream is Full-Refresh only"
timeout_seconds: 3600
full_refresh:
- config_path: "secrets/config_oauth.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
tests:
- config_path: "secrets/config_oauth.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 3600

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": true,
"default_cursor_field": ["lastModified"]
"default_cursor_field": []
},
"sync_mode": "incremental",
"cursor_field": ["lastModified"],
"sync_mode": "full_refresh",
"cursor_field": [],
"destination_sync_mode": "append"
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{"stream": "accounts", "data": {"test": false, "notifiedOnCreativeRejection": false, "notifiedOnEndOfCampaign": false, "servingStatuses": ["BILLING_HOLD"], "notifiedOnCampaignOptimization": false, "type": "BUSINESS", "version": {"versionTag": "4"}, "reference": "urn:li:organization:64265083", "notifiedOnCreativeApproval": false, "name": "Test Account 1", "currency": "USD", "id": 508777244, "status": "ACTIVE", "created": "2021-08-21 21:27:55", "lastModified": "2021-08-22 20:35:44"}, "emitted_at": 1672747146699}
{"stream": "accounts", "data": {"test": false, "notifiedOnCreativeRejection": false, "notifiedOnEndOfCampaign": false, "servingStatuses": ["BILLING_HOLD"], "notifiedOnCampaignOptimization": false, "type": "BUSINESS", "version": {"versionTag": "3"}, "reference": "urn:li:person:HRnXB4kIO7", "notifiedOnCreativeApproval": false, "name": "Test Account 3", "currency": "NOK", "id": 510426150, "status": "ACTIVE", "created": "2022-10-07 16:41:09", "lastModified": "2022-10-07 16:41:09"}, "emitted_at": 1672747146699}
{"stream": "account_users", "data": {"role": "ACCOUNT_BILLING_ADMIN", "user": "urn:li:person:HRnXB4kIO7", "account": "urn:li:sponsoredAccount:508777244", "created": "2021-08-21 21:27:55", "lastModified": "2021-08-21 21:27:55"}, "emitted_at": 1672747148189}
{"stream": "account_users", "data": {"role": "ACCOUNT_BILLING_ADMIN", "user": "urn:li:person:HRnXB4kIO7", "account": "urn:li:sponsoredAccount:510426150", "created": "2022-10-07 16:41:09", "lastModified": "2022-10-07 16:41:09"}, "emitted_at": 1672747148389}
{"stream": "campaign_groups", "data": {"runSchedule": {"start": 1629581275652}, "test": false, "name": "Test Campaign Group 1", "servingStatuses": ["STOPPED", "BILLING_HOLD"], "backfilled": false, "id": 616749086, "account": "urn:li:sponsoredAccount:508777244", "status": "PAUSED", "created": "2021-08-21 21:27:55", "lastModified": "2021-08-22 20:29:09"}, "emitted_at": 1672747149863}
{"stream": "campaign_groups", "data": {"runSchedule": {"start": 1665160869034}, "test": false, "name": "New Campaign Group", "servingStatuses": ["BILLING_HOLD"], "backfilled": false, "id": 628297234, "account": "urn:li:sponsoredAccount:510426150", "status": "ACTIVE", "created": "2022-10-07 16:41:09", "lastModified": "2022-10-07 19:16:09"}, "emitted_at": 1672747150066}
{"stream": "campaigns", "data": {"storyDeliveryEnabled": false, "targetingCriteria": {"include": {"and": [{"type": "urn:li:adTargetingFacet:titles", "values": ["urn:li:title:100", "urn:li:title:10326", "urn:li:title:10457", "urn:li:title:10738", "urn:li:title:10966", "urn:li:title:11349", "urn:li:title:1159", "urn:li:title:11622", "urn:li:title:1176", "urn:li:title:11886", "urn:li:title:1211", "urn:li:title:12490", "urn:li:title:13499", "urn:li:title:1359", "urn:li:title:1399", "urn:li:title:1414", "urn:li:title:14642", "urn:li:title:14893", "urn:li:title:1586", "urn:li:title:160", "urn:li:title:16432", "urn:li:title:1685", "urn:li:title:17134", "urn:li:title:17265", "urn:li:title:1845", "urn:li:title:189", "urn:li:title:1890", "urn:li:title:18930", "urn:li:title:1897", "urn:li:title:191", "urn:li:title:2105", "urn:li:title:2189", "urn:li:title:219", "urn:li:title:23347", "urn:li:title:23484", "urn:li:title:24", "urn:li:title:25166", "urn:li:title:25169", "urn:li:title:25170", "urn:li:title:25194", "urn:li:title:25201", "urn:li:title:25203", "urn:li:title:25204", "urn:li:title:253", "urn:li:title:266", "urn:li:title:2740", "urn:li:title:3172", "urn:li:title:318", "urn:li:title:328", "urn:li:title:332", "urn:li:title:3516", "urn:li:title:3549", "urn:li:title:3598", "urn:li:title:39", "urn:li:title:3927", "urn:li:title:424", "urn:li:title:4327", "urn:li:title:4384", "urn:li:title:4403", "urn:li:title:4484", "urn:li:title:4677", "urn:li:title:4691", "urn:li:title:5316", "urn:li:title:539", "urn:li:title:556", "urn:li:title:5762", "urn:li:title:599", "urn:li:title:6058", "urn:li:title:607", "urn:li:title:659", "urn:li:title:661", "urn:li:title:67", "urn:li:title:7000", "urn:li:title:7110", "urn:li:title:7176", "urn:li:title:7555", "urn:li:title:761", "urn:li:title:7732", "urn:li:title:9", "urn:li:title:932", "urn:li:title:940", "urn:li:title:9540", "urn:li:title:9633", "urn:li:title:971", "urn:li:title:9715", "urn:li:title:9763"]}, {"type": "urn:li:adTargetingFacet:locations", "values": ["urn:li:geo:103644278"]}, {"type": "urn:li:adTargetingFacet:interfaceLocales", "values": ["urn:li:locale:en_US"]}]}}, "pacingStrategy": "LIFETIME", "locale": {"country": "US", "language": "en"}, "type": "SPONSORED_UPDATES", "optimizationTargetType": "MAX_CLICK", "runSchedule": {"start": 1629849600000}, "costType": "CPM", "creativeSelection": "OPTIMIZED", "offsiteDeliveryEnabled": true, "id": 169185036, "audienceExpansionEnabled": true, "test": false, "format": "STANDARD_UPDATE", "servingStatuses": ["STOPPED", "ACCOUNT_SERVING_HOLD", "CAMPAIGN_GROUP_STATUS_HOLD"], "version": {"versionTag": "3"}, "objectiveType": "WEBSITE_VISIT", "associatedEntity": "urn:li:organization:64265083", "offsitePreferences": {"iabCategories": {"exclude": []}, "publisherRestrictionFiles": {"include": [], "exclude": []}}, "campaignGroup": "urn:li:sponsoredCampaignGroup:616749096", "dailyBudget": {"currencyCode": "USD", "amount": "75"}, "unitCost": {"currencyCode": "USD", "amount": "16.41"}, "name": "Website visits - Aug 25, 2021", "account": "urn:li:sponsoredAccount:508774356", "status": "DRAFT", "created": "2021-08-25 10:52:29", "lastModified": "2021-11-07 12:41:09"}, "emitted_at": 1672747151318}
{"stream": "campaigns", "data": {"storyDeliveryEnabled": false, "targetingCriteria": {"include": {"and": [{"type": "urn:li:adTargetingFacet:interfaceLocales", "values": ["urn:li:locale:en_US"]}, {"type": "urn:li:adTargetingFacet:locations", "values": ["urn:li:geo:103644278"]}]}}, "pacingStrategy": "LIFETIME", "locale": {"country": "US", "language": "en"}, "type": "SPONSORED_UPDATES", "optimizationTargetType": "MAX_REACH", "runSchedule": {"start": 1629590400000}, "costType": "CPM", "creativeSelection": "OPTIMIZED", "offsiteDeliveryEnabled": true, "id": 169037246, "audienceExpansionEnabled": true, "test": false, "format": "SINGLE_VIDEO", "servingStatuses": ["STOPPED", "ACCOUNT_SERVING_HOLD", "CAMPAIGN_GROUP_STATUS_HOLD"], "version": {"versionTag": "3"}, "objectiveType": "BRAND_AWARENESS", "associatedEntity": "urn:li:organization:64265083", "offsitePreferences": {"iabCategories": {"exclude": []}, "publisherRestrictionFiles": {"include": [], "exclude": []}}, "campaignGroup": "urn:li:sponsoredCampaignGroup:616749086", "dailyBudget": {"currencyCode": "USD", "amount": "100"}, "unitCost": {"currencyCode": "USD", "amount": "61.02"}, "name": "Brand awareness - Aug 22, 2021", "account": "urn:li:sponsoredAccount:508777244", "status": "DRAFT", "created": "2021-08-22 20:37:17", "lastModified": "2021-11-07 12:20:05"}, "emitted_at": 1672747151573}
{"stream": "creatives", "data": {"reference": "urn:li:share:6836249289476456448", "variables": {"type": "com.linkedin.ads.SponsoredUpdateCreativeVariables", "values": [{"key": "activity", "value": "\"urn:li:activity:6836249289996558336\""}, {"key": "directSponsoredContent", "value": "true"}, {"key": "share", "value": "\"urn:li:share:6836249289476456448\""}]}, "test": false, "review": {"reviewStatus": "PENDING"}, "servingStatuses": ["UNDER_REVIEW"], "campaign": "urn:li:sponsoredCampaign:169185036", "id": 136324456, "type": "SPONSORED_STATUS_UPDATE", "version": {"versionTag": "2"}, "status": "ACTIVE", "created": "2021-08-25 10:54:02", "lastModified": "2022-06-30 23:23:41"}, "emitted_at": 1672747153832}
{"stream": "creatives", "data": {"reference": "urn:li:ugcPost:6835311566041284608", "processingState": "PROCESSING_SUCCEEDED", "variables": {"type": "com.linkedin.ads.SponsoredVideoCreativeVariables", "values": [{"key": "videoAspectRatio", "value": "{\"widthAspect\": 16.0, \"heightAspect\": 9.0}"}, {"key": "mediaAsset", "value": "\"urn:li:digitalmediaAsset:C5610AQFvkR0uBh0b5Q\""}, {"key": "userGeneratedContentPost", "value": "\"urn:li:ugcPost:6835311566041284608\""}, {"key": "callToActionEnabled", "value": "true"}, {"key": "directSponsoredContent", "value": "true"}, {"key": "durationMicro", "value": "6767000"}]}, "test": false, "review": {"reviewStatus": "PENDING"}, "campaign": "urn:li:sponsoredCampaign:169037246", "servingStatuses": ["UNDER_REVIEW"], "id": 135841046, "type": "SPONSORED_VIDEO", "version": {"versionTag": "5"}, "status": "ACTIVE", "created": "2021-08-22 20:49:25", "lastModified": "2021-09-10 15:51:03"}, "emitted_at": 1672747154341}
{"stream": "ad_direct_sponsored_contents", "data": {"owner": "urn:li:organization:64265083", "contentReference": "urn:li:share:6836249289476456448", "name": "Test Ad Single Image 2", "type": "STANDARD", "account": "urn:li:sponsoredAccount:508774356", "status": "ACTIVE", "created": "2021-08-25 10:54:02", "lastModified": "2021-08-25 10:54:02"}, "emitted_at": 1672747155664}
{"stream": "ad_direct_sponsored_contents", "data": {"owner": "urn:li:organization:64265083", "contentReference": "urn:li:ugcPost:6835311566041284608", "name": "Test VideoAd 1 Test", "type": "VIDEO", "account": "urn:li:sponsoredAccount:508777244", "status": "ACTIVE", "created": "2021-08-22 20:49:22", "lastModified": "2021-09-10 15:51:03"}, "emitted_at": 1672747155826}
{"stream": "ad_campaign_analytics", "data": {"actionClicks": 0, "externalWebsitePostClickConversions": 0, "pivotValue": "urn:li:sponsoredCampaign:168387646", "comments": 0, "externalWebsitePostViewConversions": 0, "costInUsd": "0.4199999999999997", "commentLikes": 0, "adUnitClicks": 0, "companyPageClicks": 0, "follows": 0, "conversionValueInLocalCurrency": "0", "costInLocalCurrency": "0.4199999999999997", "externalWebsiteConversions": 0, "cardImpressions": 0, "clicks": 1, "cardClicks": 0, "approximateUniqueImpressions": 116, "start_date": "2021-08-14", "end_date": "2021-08-14", "_pivot": "CAMPAIGN", "oneClickLeads": 0, "landingPageClicks": 1, "fullScreenPlays": 0, "oneClickLeadFormOpens": 0, "textUrlClicks": 0, "impressions": 116, "otherEngagements": 0, "sends": 0, "shares": 0, "leadGenerationMailContactInfoShares": 0, "opens": 0, "leadGenerationMailInterestedClicks": 0, "reactions": 0, "pivotValues": ["urn:li:sponsoredCampaign:168387646"], "likes": 0, "viralComments": 0, "videoCompletions": 0, "viralCardImpressions": 0, "videoFirstQuartileCompletions": 0, "viralCommentLikes": 0, "viralFollows": 0, "videoStarts": 0, "viralExternalWebsiteConversions": 0, "viralExternalWebsitePostClickConversions": 0, "videoMidpointCompletions": 0, "viralCardClicks": 0, "videoThirdQuartileCompletions": 0, "viralExternalWebsitePostViewConversions": 0, "totalEngagements": 1, "viralClicks": 0, "viralCompanyPageClicks": 0, "videoViews": 0}, "emitted_at": 1672747177293}
{"stream": "ad_campaign_analytics", "data": {"actionClicks": 0, "externalWebsitePostClickConversions": 0, "pivotValue": "urn:li:sponsoredCampaign:168387646", "comments": 0, "externalWebsitePostViewConversions": 0, "costInUsd": "14.999999999999999", "commentLikes": 0, "adUnitClicks": 0, "companyPageClicks": 0, "follows": 0, "conversionValueInLocalCurrency": "0", "costInLocalCurrency": "14.999999999999999", "externalWebsiteConversions": 0, "cardImpressions": 0, "clicks": 3, "cardClicks": 0, "approximateUniqueImpressions": 1279, "start_date": "2021-08-06", "end_date": "2021-08-06", "_pivot": "CAMPAIGN", "oneClickLeads": 0, "landingPageClicks": 3, "fullScreenPlays": 0, "oneClickLeadFormOpens": 0, "textUrlClicks": 0, "impressions": 1606, "otherEngagements": 0, "sends": 0, "shares": 0, "leadGenerationMailContactInfoShares": 0, "opens": 0, "leadGenerationMailInterestedClicks": 0, "reactions": 0, "pivotValues": ["urn:li:sponsoredCampaign:168387646"], "likes": 0, "viralComments": 0, "videoCompletions": 0, "viralCardImpressions": 0, "videoFirstQuartileCompletions": 0, "viralCommentLikes": 0, "viralFollows": 0, "videoStarts": 0, "viralExternalWebsiteConversions": 0, "viralExternalWebsitePostClickConversions": 0, "videoMidpointCompletions": 0, "viralCardClicks": 0, "videoThirdQuartileCompletions": 0, "viralExternalWebsitePostViewConversions": 0, "totalEngagements": 3, "viralClicks": 0, "viralCompanyPageClicks": 0, "videoViews": 0}, "emitted_at": 1672747177294}
{"stream": "ad_creative_analytics", "data": {"actionClicks": 0, "externalWebsitePostClickConversions": 0, "pivotValue": "urn:li:sponsoredCreative:133813726", "comments": 0, "externalWebsitePostViewConversions": 0, "costInUsd": "6.4600000000000021", "commentLikes": 0, "adUnitClicks": 0, "companyPageClicks": 0, "follows": 0, "conversionValueInLocalCurrency": "0", "costInLocalCurrency": "6.4600000000000021", "externalWebsiteConversions": 0, "cardImpressions": 0, "clicks": 5, "cardClicks": 0, "approximateUniqueImpressions": 371, "start_date": "2021-08-08", "end_date": "2021-08-08", "_pivot": "CREATIVE", "oneClickLeads": 0, "landingPageClicks": 5, "fullScreenPlays": 0, "oneClickLeadFormOpens": 0, "textUrlClicks": 0, "impressions": 403, "otherEngagements": 0, "sends": 0, "shares": 0, "leadGenerationMailContactInfoShares": 0, "opens": 0, "leadGenerationMailInterestedClicks": 0, "reactions": 0, "pivotValues": ["urn:li:sponsoredCreative:133813726"], "likes": 0, "viralComments": 0, "videoCompletions": 0, "viralCardImpressions": 0, "videoFirstQuartileCompletions": 0, "viralCommentLikes": 0, "viralFollows": 0, "videoStarts": 0, "viralExternalWebsiteConversions": 0, "viralExternalWebsitePostClickConversions": 0, "videoMidpointCompletions": 0, "viralCardClicks": 0, "videoThirdQuartileCompletions": 0, "viralExternalWebsitePostViewConversions": 0, "totalEngagements": 5, "viralClicks": 0, "viralCompanyPageClicks": 0, "videoViews": 0}, "emitted_at": 1672747243121}
{"stream": "ad_creative_analytics", "data": {"actionClicks": 0, "externalWebsitePostClickConversions": 0, "pivotValue": "urn:li:sponsoredCreative:133813726", "comments": 0, "externalWebsitePostViewConversions": 0, "costInUsd": "12.4700000000000025", "commentLikes": 0, "adUnitClicks": 0, "companyPageClicks": 0, "follows": 0, "conversionValueInLocalCurrency": "0", "costInLocalCurrency": "12.4700000000000025", "externalWebsiteConversions": 0, "cardImpressions": 0, "clicks": 3, "cardClicks": 0, "approximateUniqueImpressions": 902, "start_date": "2021-08-11", "end_date": "2021-08-11", "_pivot": "CREATIVE", "oneClickLeads": 0, "landingPageClicks": 3, "fullScreenPlays": 0, "oneClickLeadFormOpens": 0, "textUrlClicks": 0, "impressions": 994, "otherEngagements": 0, "sends": 0, "shares": 0, "leadGenerationMailContactInfoShares": 0, "opens": 0, "leadGenerationMailInterestedClicks": 0, "reactions": 0, "pivotValues": ["urn:li:sponsoredCreative:133813726"], "likes": 0, "viralComments": 0, "videoCompletions": 0, "viralCardImpressions": 0, "videoFirstQuartileCompletions": 0, "viralCommentLikes": 0, "viralFollows": 0, "videoStarts": 0, "viralExternalWebsiteConversions": 0, "viralExternalWebsitePostClickConversions": 0, "videoMidpointCompletions": 0, "viralCardClicks": 0, "videoThirdQuartileCompletions": 0, "viralExternalWebsitePostViewConversions": 0, "totalEngagements": 3, "viralClicks": 0, "viralCompanyPageClicks": 0, "videoViews": 0}, "emitted_at": 1672747243122}