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 TypeForm: tune integration tests #15446

Merged
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -12,7 +12,11 @@ tests:
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
# incremental test doesn't work if a single stream has multiple states right now
empty_streams: ["webhooks"]
expect_records:
path: "integration_tests/expected_records.txt"
# Although incremental tests pass, they don't actually test anything because SATs currently
# do not support nested dynamic state. That's why incremental read is tested with a dedicated integration test.
#incremental:
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
},
"XtrcGoGJ": {
"submitted_at": 9999999999
},
"kRt99jlK": {
"submitted_at": 9999999999
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,69 @@
"stream": {
"name": "forms",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
"destination_sync_mode": "append",
"primary_key": [["id"]]
},
{
"stream": {
"name": "responses",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"],
"source_defined_cursor": true,
"default_cursor_field": ["submitted_at"]
"default_cursor_field": ["submitted_at"],
"source_defined_primary_key": [["response_id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
"destination_sync_mode": "append",
"primary_key": [["response_id"]]
},
{
"stream": {
"name": "workspaces",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
"destination_sync_mode": "append",
"primary_key": [["id"]]
},
{
"stream": {
"name": "images",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
"destination_sync_mode": "append",
"primary_key": [["id"]]
},
{
"stream": {
"name": "themes",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
"destination_sync_mode": "append",
"primary_key": [["id"]]
},
{
"stream": {
"name": "webhooks",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append",
"primary_key": [["id"]]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#

import json

import pendulum
import pytest


@pytest.fixture(scope="session", name="config")
def config_fixture():
with open("secrets/config.json", "r") as config_file:
config = json.load(config_file)
today = pendulum.now(tz="UTC")
start_date = today.subtract(years=2)
config["start_date"] = start_date.format("YYYY-MM-DDTHH:mm:ss[Z]")
return config


@pytest.fixture(scope="session", name="abnormal_state")
def state_fixture():
with open("integration_tests/abnormal_state.json", "r") as state_file:
return json.load(state_file)
Loading