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 Intercom: high test strictness level #21859

Merged

Conversation

davydov-d
Copy link
Collaborator

What

#19050

How

  • Modify configured catalogs
  • Add expected records
  • Refactor acceptance test config

@davydov-d
Copy link
Collaborator Author

davydov-d commented Jan 25, 2023

/test connector=connectors/source-intercom

🕑 connectors/source-intercom https://github.com/airbytehq/airbyte/actions/runs/4008102020
✅ connectors/source-intercom https://github.com/airbytehq/airbyte/actions/runs/4008102020
Python tests coverage:

Name                          Stmts   Miss  Cover
-------------------------------------------------
source_intercom/__init__.py       2      0   100%
source_intercom/utils.py         60      8    87%
source_intercom/source.py       250     42    83%
-------------------------------------------------
TOTAL                           312     50    84%
Name                          Stmts   Miss  Cover
-------------------------------------------------
source_intercom/__init__.py       2      0   100%
source_intercom/utils.py         60      1    98%
source_intercom/source.py       250     21    92%
-------------------------------------------------
TOTAL                           312     22    93%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       141      5    96%   87, 93, 239, 243-244
	 source_acceptance_test/conftest.py                     211     95    55%   36, 42-44, 49, 54, 77, 83, 89-91, 110, 115-117, 123-125, 131-132, 137-138, 143, 149, 158-167, 173-178, 193, 217, 248, 254, 262-267, 275-285, 293-306, 311-317, 324-335, 342-358
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              402    115    71%   53, 58, 93-104, 109-116, 120-121, 125-126, 308, 346-363, 376-387, 391-396, 402, 435-440, 478-485, 528-530, 533, 598-606, 618-621, 626, 682-683, 689, 692, 728-738, 751-776
	 source_acceptance_test/tests/test_incremental.py       160     14    91%   58-65, 70-83, 246
	 source_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       133     33    75%   24-27, 46-47, 50-54, 57-58, 73-75, 78-80, 83-85, 88-90, 93-95, 124-125, 159-161, 208
	 source_acceptance_test/utils/json_schema_helper.py     107     13    88%   30-31, 38, 41, 65-68, 96, 120, 192-194
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1609    339    79%

Build Passed

Test summary info:

	 =========================== short test summary info ============================
	 SKIPPED [9] integration_tests/integration_test.py:33: need to refresh this test, it is very slow
	 �[33m============= �[32m2 passed�[0m, �[33m�[1m9 skipped�[0m, �[33m�[1m27 warnings�[0m�[33m in 70.36s (0:01:10)�[0m�[33m =============�[0m
=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_core.py:94: The previous and actual specifications are identical.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_core.py:377: The previous and actual discovered catalogs are identical.
================== 29 passed, 2 skipped in 120.76s (0:02:00) ===================

@@ -1,33 +1,40 @@
# 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-intercom:dev
tests:
test_strictness_level: high
acceptance_tests:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 no bypass reason

{"stream": "admins", "data": {"type": "admin", "email": "integration-test@airbyte.io", "id": "4423433", "name": "Airbyte Team", "away_mode_enabled": false, "away_mode_reassign": false, "has_inbox_seat": false, "team_ids": [], "team_priority_level": {}}, "emitted_at": 1674662478119}
{"stream": "admins", "data": {"type": "admin", "email": "operator+wjw5eps7@intercom.io", "id": "4423434", "name": "Operator", "away_mode_enabled": false, "away_mode_reassign": false, "has_inbox_seat": false, "team_ids": [], "team_priority_level": {}}, "emitted_at": 1674662478120}
{"stream": "admins", "data": {"type": "admin", "email": "jared@daxtarity.com", "id": "4425337", "name": "Jared Rhizor", "away_mode_enabled": false, "away_mode_reassign": false, "has_inbox_seat": false, "team_ids": [], "team_priority_level": {}}, "emitted_at": 1674662478120}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, he worked here

{"stream": "contacts", "data": {"type": "contact", "id": "5fc95a808084cd6950bc8d9b", "workspace_id": "wjw5eps7", "external_id": "1", "role": "user", "email": "test@test.com", "phone": null, "name": "Test", "avatar": null, "owner_id": null, "social_profiles": {"type": "list", "data": []}, "has_hard_bounced": false, "marked_email_as_spam": false, "unsubscribed_from_emails": false, "created_at": 1607031424, "updated_at": 1625749675, "signed_up_at": null, "last_seen_at": null, "last_replied_at": null, "last_contacted_at": null, "last_email_opened_at": null, "last_email_clicked_at": null, "language_override": null, "browser": null, "browser_version": null, "browser_language": null, "os": null, "location": {"type": "location", "country": null, "region": null, "city": null, "country_code": null, "continent_code": null}, "android_app_name": null, "android_app_version": null, "android_device": null, "android_os_version": null, "android_sdk_version": null, "android_last_seen_at": null, "ios_app_name": null, "ios_app_version": null, "ios_device": null, "ios_os_version": null, "ios_sdk_version": null, "ios_last_seen_at": null, "custom_attributes": {}, "tags": {"type": "list", "data": [], "url": "/contacts/5fc95a808084cd6950bc8d9b/tags", "total_count": 0, "has_more": false}, "notes": {"type": "list", "data": [], "url": "/contacts/5fc95a808084cd6950bc8d9b/notes", "total_count": 0, "has_more": false}, "companies": {"type": "list", "data": [{"id": "60e6f753a99f97268e85bf52", "type": "company", "url": "/companies/60e6f753a99f97268e85bf52"}], "url": "/contacts/5fc95a808084cd6950bc8d9b/companies", "total_count": 1, "has_more": false}, "opted_out_subscription_types": {"type": "list", "data": [], "url": "/contacts/5fc95a808084cd6950bc8d9b/subscriptions", "total_count": 0, "has_more": false}, "utm_campaign": null, "utm_content": null, "utm_medium": null, "utm_source": null, "utm_term": null, "referrer": null, "sms_consent": false, "unsubscribed_from_sms": false}, "emitted_at": 1674662493255}
{"stream": "contacts", "data": {"type": "contact", "id": "6241a38316049ffd7261a0dc", "workspace_id": "wjw5eps7", "external_id": "1234", "role": "user", "email": "test@gmail.com", "phone": null, "name": "Tets", "avatar": null, "owner_id": null, "social_profiles": {"type": "list", "data": []}, "has_hard_bounced": false, "marked_email_as_spam": false, "unsubscribed_from_emails": false, "created_at": 1648468867, "updated_at": 1648468867, "signed_up_at": null, "last_seen_at": null, "last_replied_at": null, "last_contacted_at": null, "last_email_opened_at": null, "last_email_clicked_at": null, "language_override": null, "browser": null, "browser_version": null, "browser_language": null, "os": null, "location": {"type": "location", "country": null, "region": null, "city": null, "country_code": null, "continent_code": null}, "android_app_name": null, "android_app_version": null, "android_device": null, "android_os_version": null, "android_sdk_version": null, "android_last_seen_at": null, "ios_app_name": null, "ios_app_version": null, "ios_device": null, "ios_os_version": null, "ios_sdk_version": null, "ios_last_seen_at": null, "custom_attributes": {}, "tags": {"type": "list", "data": [], "url": "/contacts/6241a38316049ffd7261a0dc/tags", "total_count": 0, "has_more": false}, "notes": {"type": "list", "data": [], "url": "/contacts/6241a38316049ffd7261a0dc/notes", "total_count": 0, "has_more": false}, "companies": {"type": "list", "data": [], "url": "/contacts/6241a38316049ffd7261a0dc/companies", "total_count": 0, "has_more": false}, "opted_out_subscription_types": {"type": "list", "data": [], "url": "/contacts/6241a38316049ffd7261a0dc/subscriptions", "total_count": 0, "has_more": false}, "utm_campaign": null, "utm_content": null, "utm_medium": null, "utm_source": null, "utm_term": null, "referrer": null, "sms_consent": false, "unsubscribed_from_sms": false}, "emitted_at": 1674662493256}
{"stream": "contacts", "data": {"type": "contact", "id": "62de64071123272c1ff04f29", "workspace_id": "wjw5eps7", "external_id": "123", "role": "user", "email": "test@example.com", "phone": null, "name": "Fake user1", "avatar": null, "owner_id": null, "social_profiles": {"type": "list", "data": []}, "has_hard_bounced": false, "marked_email_as_spam": false, "unsubscribed_from_emails": false, "created_at": 1658741767, "updated_at": 1658741767, "signed_up_at": null, "last_seen_at": null, "last_replied_at": null, "last_contacted_at": null, "last_email_opened_at": null, "last_email_clicked_at": null, "language_override": null, "browser": null, "browser_version": null, "browser_language": null, "os": null, "location": {"type": "location", "country": null, "region": null, "city": null, "country_code": null, "continent_code": null}, "android_app_name": null, "android_app_version": null, "android_device": null, "android_os_version": null, "android_sdk_version": null, "android_last_seen_at": null, "ios_app_name": null, "ios_app_version": null, "ios_device": null, "ios_os_version": null, "ios_sdk_version": null, "ios_last_seen_at": null, "custom_attributes": {}, "tags": {"type": "list", "data": [], "url": "/contacts/62de64071123272c1ff04f29/tags", "total_count": 0, "has_more": false}, "notes": {"type": "list", "data": [], "url": "/contacts/62de64071123272c1ff04f29/notes", "total_count": 0, "has_more": false}, "companies": {"type": "list", "data": [], "url": "/contacts/62de64071123272c1ff04f29/companies", "total_count": 0, "has_more": false}, "opted_out_subscription_types": {"type": "list", "data": [], "url": "/contacts/62de64071123272c1ff04f29/subscriptions", "total_count": 0, "has_more": false}, "utm_campaign": null, "utm_content": null, "utm_medium": null, "utm_source": null, "utm_term": null, "referrer": null, "sms_consent": false, "unsubscribed_from_sms": false}, "emitted_at": 1674662493257}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 fake emails

{"stream": "conversations", "data": {"type": "conversation", "id": "1", "created_at": 1607553243, "updated_at": 1626346673, "waiting_since": null, "snoozed_until": null, "source": {"type": "conversation", "id": "701718739", "delivered_as": "customer_initiated", "subject": "", "body": "<p>hey there</p>", "author": {"type": "lead", "id": "5fd150d50697b6d0bbc4a2c2", "name": null, "email": ""}, "attachments": [], "url": "http://localhost:63342/airbyte-python/airbyte-integrations/bases/base-java/build/tmp/expandedArchives/org.jacoco.agent-0.8.5.jar_6a2df60c47de373ea127d14406367999/about.html?_ijt=uosck1k6vmp2dnl4oqib2g3u9d", "redacted": false}, "contacts": {"type": "contact.list", "contacts": [{"type": "contact", "id": "5fd150d50697b6d0bbc4a2c2"}]}, "first_contact_reply": {"created_at": 1607553243, "type": "conversation", "url": "http://localhost:63342/airbyte-python/airbyte-integrations/bases/base-java/build/tmp/expandedArchives/org.jacoco.agent-0.8.5.jar_6a2df60c47de373ea127d14406367999/about.html?_ijt=uosck1k6vmp2dnl4oqib2g3u9d"}, "admin_assignee_id": null, "team_assignee_id": null, "open": true, "state": "open", "read": false, "tags": {"type": "tag.list", "tags": []}, "priority": "not_priority", "sla_applied": null, "statistics": {"type": "conversation_statistics", "time_to_assignment": null, "time_to_admin_reply": 4317957, "time_to_first_close": null, "time_to_last_close": null, "median_time_to_reply": 4317954, "first_contact_reply_at": 1607553243, "first_assignment_at": null, "first_admin_reply_at": 1625654131, "first_close_at": null, "last_assignment_at": null, "last_assignment_admin_reply_at": null, "last_contact_reply_at": 1607553246, "last_admin_reply_at": 1625656000, "last_close_at": null, "last_closed_by_id": null, "count_reopens": 0, "count_assignments": 0, "count_conversation_parts": 7}, "conversation_rating": null, "teammates": {"type": "admin.list", "admins": [{"type": "admin", "id": "4423433"}]}, "title": null, "custom_attributes": {}, "topics": {"type": "topic.list", "topics": [], "total_count": 0}}, "emitted_at": 1674662485998}
{"stream": "conversations", "data": {"type": "conversation", "id": "2", "created_at": 1625749234, "updated_at": 1632835061, "waiting_since": null, "snoozed_until": null, "source": {"type": "conversation", "id": "906873821", "delivered_as": "admin_initiated", "subject": "", "body": "<p>Hi Jean,</p>", "author": {"type": "admin", "id": "4423433", "name": "Airbyte Team", "email": "integration-test@airbyte.io"}, "attachments": [], "url": null, "redacted": false}, "contacts": {"type": "contact.list", "contacts": [{"type": "contact", "id": "60e6f6e020ae45ce1ac86f26"}]}, "first_contact_reply": null, "admin_assignee_id": 4423433, "team_assignee_id": null, "open": false, "state": "closed", "read": true, "tags": {"type": "tag.list", "tags": []}, "priority": "not_priority", "sla_applied": null, "statistics": {"type": "conversation_statistics", "time_to_assignment": null, "time_to_admin_reply": null, "time_to_first_close": null, "time_to_last_close": null, "median_time_to_reply": null, "first_contact_reply_at": null, "first_assignment_at": null, "first_admin_reply_at": null, "first_close_at": null, "last_assignment_at": null, "last_assignment_admin_reply_at": null, "last_contact_reply_at": null, "last_admin_reply_at": null, "last_close_at": null, "last_closed_by_id": null, "count_reopens": 0, "count_assignments": 0, "count_conversation_parts": 7}, "conversation_rating": null, "teammates": {"type": "admin.list", "admins": []}, "title": null, "custom_attributes": {}, "topics": {"type": "topic.list", "topics": [], "total_count": 0}}, "emitted_at": 1674662485999}
{"stream": "conversations", "data": {"type": "conversation", "id": "3", "created_at": 1657296525, "updated_at": 1657296525, "waiting_since": null, "snoozed_until": null, "source": {"type": "conversation", "id": "1365286568", "delivered_as": "admin_initiated", "subject": "", "body": "<p>Hi Jean, integration test intercom message to verify assignee value</p>", "author": {"type": "admin", "id": "4423433", "name": "Airbyte Team", "email": "integration-test@airbyte.io"}, "attachments": [], "url": null, "redacted": false}, "contacts": {"type": "contact.list", "contacts": [{"type": "contact", "id": "60e6f6e020ae45ce1ac86f26"}]}, "first_contact_reply": null, "admin_assignee_id": null, "team_assignee_id": null, "open": false, "state": "closed", "read": false, "tags": {"type": "tag.list", "tags": []}, "priority": "not_priority", "sla_applied": null, "statistics": {"type": "conversation_statistics", "time_to_assignment": null, "time_to_admin_reply": null, "time_to_first_close": null, "time_to_last_close": null, "median_time_to_reply": null, "first_contact_reply_at": null, "first_assignment_at": null, "first_admin_reply_at": null, "first_close_at": null, "last_assignment_at": null, "last_assignment_admin_reply_at": null, "last_contact_reply_at": null, "last_admin_reply_at": null, "last_close_at": null, "last_closed_by_id": null, "count_reopens": 0, "count_assignments": 0, "count_conversation_parts": 1}, "conversation_rating": null, "teammates": {"type": "admin.list", "admins": [{"type": "admin", "id": "4423433"}]}, "title": null, "custom_attributes": {}, "topics": {"type": "topic.list", "topics": [], "total_count": 0}}, "emitted_at": 1674662485999}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 no real customer converstations

@davydov-d davydov-d merged commit 4ae80b0 into master Jan 25, 2023
@davydov-d davydov-d deleted the ddavydov/#19050-source-intercom-test-strictness-level-high branch January 25, 2023 18:52
@davydov-d davydov-d linked an issue Jan 25, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Intercom: enable high test strictness level in SAT
4 participants