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 Mixpanel: enable high test strictness level in SAT #21510

Merged
merged 11 commits into from
Jan 25, 2023
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mixpanel/README.md
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,42 +1,53 @@
# 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-mixpanel:dev
tests:
test_strictness_level: "high"
acceptance_tests:
spec:
- spec_path: "source_mixpanel/spec.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.23"
tests:
- spec_path: "source_mixpanel/spec.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.23"
connection:
- config_path: "secrets/config_old.json"
status: "succeed"
- config_path: "secrets/config_project_secret.json"
status: "succeed"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
tests:
- config_path: "secrets/config_old.json"
status: "succeed"
- config_path: "secrets/config_project_secret.json"
status: "succeed"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.23"
timeout_seconds: 60
tests:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.23"
timeout_seconds: 60
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 3600
empty_streams: ['export', 'annotations']
tests:
- config_path: "secrets/config.json"
timeout_seconds: 3600
expect_records:
path: "integration_tests/expected_records.jsonl"
extra_fields: no
exact_order: no
extra_records: yes
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 3600
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 3600
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
cohorts: ["created"]
export: ["time"]
funnels: ["8901755", "date"]
revenue: ["date"]
cohort_members": ["last_seen"]
timeout_seconds: 3600
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
cohorts: ["created"]
export: ["time"]
funnels: ["8901755", "date"]
revenue: ["date"]
cohort_members": ["last_seen"]
timeout_seconds: 3600
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@
"stream": {
"name": "funnels",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date"],
"source_defined_primary_key": [["funnel_id"], ["date"]]
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "engage",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": false,
"default_cursor_field": ["last_seen"],
"source_defined_primary_key": [["distinct_id"]]
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["last_seen"]
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
Expand All @@ -38,49 +31,37 @@
"stream": {
"name": "export",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["time"]
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "cohorts",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"],
"source_defined_primary_key": [["id"]]
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "cohort_members",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": false,
"default_cursor_field": ["last_seen"],
"source_defined_primary_key": [["distinct_id"]]
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["last_seen"]
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "revenue",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date"],
"source_defined_primary_key": [["date"]]
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"streams": [
{
"stream": {
"name": "funnels",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date"],
"source_defined_primary_key": [["funnel_id"], ["date"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "engage",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": false,
"default_cursor_field": ["last_seen"],
"source_defined_primary_key": [["distinct_id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["last_seen"]
},
{
"stream": {
"name": "export",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["time"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "cohorts",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "cohort_members",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": false,
"default_cursor_field": ["last_seen"],
"source_defined_primary_key": [["distinct_id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["last_seen"]
},
{
"stream": {
"name": "revenue",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date"],
"source_defined_primary_key": [["date"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
}
]
}
Loading