Skip to content

Commit

Permalink
Source Chargebee - Implement integration testing for otherwise untest…
Browse files Browse the repository at this point in the history
…ed streams [ITAS] (#35509)
  • Loading branch information
pnilan committed Mar 13, 2024
1 parent d00a839 commit 58b6b80
Show file tree
Hide file tree
Showing 38 changed files with 2,618 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ acceptance_tests:
timeout_seconds: 1200
empty_streams:
- name: "addon"
bypass_reason: "Not available for Product Catalog 2.0 sites."
bypass_reason: "Not available for Product Catalog 2.0 sites. Tested with mocker server tests."
- name: "plan"
bypass_reason: "Not available for Product Catalog 2.0 sites."
bypass_reason: "Not available for Product Catalog 2.0 sites. Tested with mocker server tests."
- name: "virtual_bank_account"
bypass_reason: "Cannot populate with test data"
bypass_reason: "Tested with mocker server tests."
- name: "event"
bypass_reason: "Unstable data. Test data is not persistent."
bypass_reason: "Unstable data. Test data is not persistent. Tested with mocker server tests."
- name: "site_migration_detail"
bypass_reason: "Cannot populate with test data."
bypass_reason: "Cannnot populate with test data."
- name: "customer"
bypass_reason: "To be tested with integration tests."
bypass_reason: "Tested with mocker server tests."
- name: "subscription"
bypass_reason: "To be tested with integration tests."
bypass_reason: "Tested with mocker server tests."
- name: "coupon"
bypass_reason: "To be tested with integration tests."
bypass_reason: "Tested with mocker server tests."
- name: "hosted_page"
bypass_reason: "To be tested with integration tests."
bypass_reason: "Tested with mocker server tests."
expect_records:
path: "integration_tests/expected_records.jsonl"
exact_order: no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"source_defined_primary_key": [["id"]],
"default_cursor_field": ["created_at"]
"default_cursor_field": ["updated_at"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["created_at"]
"cursor_field": ["updated_at"]
},
{
"stream": {
Expand Down Expand Up @@ -227,6 +227,19 @@
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["updated_at"]
},
{
"stream": {
"name": "site_migration_detail",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["migrated_at"],
"source_defined_primary_key": [["entity_id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["migrated_at"]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
{"stream": "item", "data": {"id": "cbdemo_advanced", "name": "Advanced", "external_name": "Advanced", "description": "Uncover hidden insights and carry out deeper analytics for your enterprise with this advanced plan.", "status": "active", "resource_version": 1674035640445, "updated_at": 1674035640, "item_family_id": "cbdemo_pf_analytics", "type": "plan", "is_shippable": true, "is_giftable": false, "enabled_for_checkout": true, "enabled_in_portal": true, "item_applicability": "all", "metered": false, "channel": "web", "metadata": {}, "object": "item", "custom_fields": []}, "emitted_at": 1678971136879}
{"stream": "item", "data": {"id": "cbdemo_basic", "name": "Basic", "external_name": "Basic", "description": "Starter plan for all your basic reporting requirements.", "status": "active", "resource_version": 1674035673162, "updated_at": 1674035673, "item_family_id": "cbdemo_pf_analytics", "type": "plan", "is_shippable": true, "is_giftable": false, "enabled_for_checkout": true, "enabled_in_portal": true, "item_applicability": "all", "metered": false, "channel": "web", "metadata": {}, "object": "item", "custom_fields": []}, "emitted_at": 1678971136891}
{"stream": "item", "data": {"id": "cbdemo_intermediary", "name": "Intermediary", "external_name": "Intermediary", "description": "Smart plan with the right mix of basic and slightly advanced reporting tools.", "status": "active", "resource_version": 1674035686971, "updated_at": 1674035686, "item_family_id": "cbdemo_pf_analytics", "type": "plan", "is_shippable": true, "is_giftable": false, "enabled_for_checkout": true, "enabled_in_portal": true, "item_applicability": "all", "metered": false, "channel": "web", "metadata": {}, "object": "item", "custom_fields": []}, "emitted_at": 1678971136900}
{"stream": "attached_item", "data": {"id": "e49c6ed7-9f1b-4c79-9235-549ce8ae9a1f", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_trial_start", "charge_once": false, "created_at": 1674032839, "resource_version": 1674032839573, "updated_at": 1674032839, "object": "attached_item", "custom_fields": []}, "emitted_at": 1676569205846}
{"stream": "attached_item", "data": {"id": "25976ccf-8e44-4fce-8eab-2a1658eb0a2b", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_analytics_additionalusers", "type": "mandatory", "status": "active", "quantity": 1, "created_at": 1674032827, "resource_version": 1674032827801, "updated_at": 1674032827, "object": "attached_item", "custom_fields": []}, "emitted_at": 1676569205849}
{"stream": "attached_item", "data": {"id": "69b451b1-e00a-4522-ab6f-027586d24b85", "parent_item_id": "cbdemo_basic", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_creation", "charge_once": false, "created_at": 1674032880, "resource_version": 1674032880261, "updated_at": 1674032880, "object": "attached_item", "custom_fields": []}, "emitted_at": 1676569206020}
{"stream": "item_price", "data": {"id": "Test-Plan-1-USD-Daily", "name": "Test Plan 1 USD Daily", "item_family_id": "cbdemo_pf_analytics", "item_id": "Test-Plan-1", "description": "Test", "status": "active", "external_name": "Test Plan 1", "pricing_model": "flat_fee", "price": 1000, "period": 1, "currency_code": "USD", "period_unit": "day", "shipping_period": 1, "shipping_period_unit": "day", "free_quantity": 0, "channel": "web", "resource_version": 1674036400224, "updated_at": 1674036400, "created_at": 1674036400, "invoice_notes": "Test", "is_taxable": true, "item_type": "plan", "show_description_in_invoices": true, "show_description_in_quotes": true, "object": "item_price", "custom_fields": []}, "emitted_at": 1678971392306}
{"stream": "item_price", "data": {"id": "Test-Gift-Plan-1-USD-Daily", "name": "Test Gift Plan 1 USD Daily", "item_family_id": "cbdemo_pf_crm", "item_id": "Test-Gift-Plan-1", "description": "Test gift", "status": "active", "external_name": "Test Gift Plan 1", "pricing_model": "flat_fee", "price": 1500, "period": 1, "currency_code": "USD", "period_unit": "day", "shipping_period": 1, "shipping_period_unit": "day", "billing_cycles": 1, "free_quantity": 0, "channel": "web", "resource_version": 1674055340456, "updated_at": 1674055340, "created_at": 1674055340, "invoice_notes": "Test gift", "is_taxable": true, "item_type": "plan", "show_description_in_invoices": true, "show_description_in_quotes": true, "object": "item_price", "custom_fields": []}, "emitted_at": 1678971392312}
{"stream": "item_price", "data": {"id": "Test-Gift-Plan-1-USD-Weekly", "name": "Test Gift Plan 1 USD Weekly", "item_family_id": "cbdemo_pf_crm", "item_id": "Test-Gift-Plan-1", "description": "Test", "status": "active", "external_name": "Test Gift Plan 1", "pricing_model": "flat_fee", "price": 20000, "period": 1, "currency_code": "USD", "period_unit": "week", "shipping_period": 1, "shipping_period_unit": "week", "billing_cycles": 1, "free_quantity": 0, "channel": "web", "resource_version": 1674056134136, "updated_at": 1674056134, "created_at": 1674056134, "is_taxable": true, "item_type": "plan", "show_description_in_invoices": true, "show_description_in_quotes": true, "object": "item_price", "custom_fields": []}, "emitted_at": 1678971392319}
{"stream": "payment_source", "data": {"id": "pm_Azz5jBTTJ96QflvC", "updated_at": 1674057604, "resource_version": 1674057604123, "deleted": false, "object": "payment_source", "customer_id": "Azz5jBTTJ96Mjlv5", "type": "card", "reference_id": "tok_Azz5jBTTJ96QSlvA", "status": "valid", "gateway": "chargebee", "gateway_account_id": "gw_16CKmRSb2oGddH4", "ip_address": "85.209.47.207", "created_at": 1674057604, "card": {"iin": "411111", "last4": "1111", "funding_type": "credit", "expiry_month": 12, "expiry_year": 2029, "masked_number": "************1111", "object": "card", "brand": "visa"}, "custom_fields": []}, "emitted_at": 1678971627515}
Expand Down Expand Up @@ -45,4 +41,7 @@
{"stream": "item_family", "data": {"id": "test-4", "name": "test item family 4", "status": "active", "resource_version": 1705960880668, "updated_at": 1705960880, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929497}
{"stream": "item_family", "data": {"id": "test-3", "name": "test item family 3", "status": "active", "resource_version": 1705956309899, "updated_at": 1705956309, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929501}
{"stream": "item_family", "data": {"id": "test-2", "name": "test item family 2", "status": "active", "resource_version": 1705956286577, "updated_at": 1705956286, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929506}
{"stream": "item_family", "data": {"id": "test-1", "name": "test item family 1", "status": "active", "resource_version": 1705956260965, "updated_at": 1705956260, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929509}
{"stream": "item_family", "data": {"id": "test-1", "name": "test item family 1", "status": "active", "resource_version": 1705956260965, "updated_at": 1705956260, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929509}
{"stream": "attached_item", "data": {"id": "25976ccf-8e44-4fce-8eab-2a1658eb0a2b", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_analytics_additionalusers", "type": "mandatory", "status": "active", "quantity": 1, "created_at": 1674032827, "resource_version": 1674032827801, "updated_at": 1674032827, "object": "attached_item", "custom_fields": []}, "emitted_at": 1708468907178}
{"stream": "attached_item", "data": {"id": "e49c6ed7-9f1b-4c79-9235-549ce8ae9a1f", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_trial_start", "charge_once": false, "created_at": 1674032839, "resource_version": 1674032839573, "updated_at": 1674032839, "object": "attached_item", "custom_fields": []}, "emitted_at": 1708468907177}
{"stream": "attached_item", "data": {"id": "69b451b1-e00a-4522-ab6f-027586d24b85", "parent_item_id": "cbdemo_basic", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_creation", "charge_once": false, "created_at": 1674032880, "resource_version": 1674032880261, "updated_at": 1674032880, "object": "attached_item", "custom_fields": []}, "emitted_at": 1708468907297}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
"stream_descriptor": { "name": "item" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "attached_item" }
}
},
{
"type": "STREAM",
"stream": {
Expand Down Expand Up @@ -124,5 +131,19 @@
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "differential_price" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "migrated_at": 2147483647 },
"stream_descriptor": { "name": "site_migration_detail" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "occurred_at": 2147483647 },
"stream_descriptor": { "name": "event" }
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
"stream_descriptor": { "name": "item" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_descriptor": { "name": "attached_item" }
}
},
{
"type": "STREAM",
"stream": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 686473f1-76d9-4994-9cc7-9b13da46147c
dockerImageTag: 0.4.0
dockerImageTag: 0.4.1
dockerRepository: airbyte/source-chargebee
documentationUrl: https://docs.airbyte.com/integrations/sources/chargebee
githubIssueLabel: source-chargebee
Expand Down
Loading

0 comments on commit 58b6b80

Please sign in to comment.