source-postgres: enable SAT high test strictness level (#20549)
This commit is contained in:
committed by
GitHub
parent
6c1869bbfb
commit
06ef1e90c6
@@ -1,7 +1,43 @@
|
||||
# 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-postgres:dev
|
||||
tests:
|
||||
test_strictness_level: high
|
||||
acceptance_tests:
|
||||
spec:
|
||||
- spec_path: "src/test-integration/resources/expected_spec.json"
|
||||
config_path: "src/test-integration/resources/dummy_config.json"
|
||||
tests:
|
||||
- spec_path: "src/test-integration/resources/expected_spec.json"
|
||||
config_path: "secrets/config.json"
|
||||
- spec_path: "src/test-integration/resources/expected_spec.json"
|
||||
config_path: "secrets/config_cdc.json"
|
||||
connection:
|
||||
tests:
|
||||
- config_path: "secrets/config.json"
|
||||
status: "succeed"
|
||||
- config_path: "secrets/config_cdc.json"
|
||||
status: "succeed"
|
||||
discovery:
|
||||
tests:
|
||||
- config_path: "secrets/config.json"
|
||||
- config_path: "secrets/config_cdc.json"
|
||||
basic_read:
|
||||
tests:
|
||||
- config_path: "secrets/config.json"
|
||||
expect_records:
|
||||
path: "integration_tests/expected_records.txt"
|
||||
- config_path: "secrets/config_cdc.json"
|
||||
expect_records:
|
||||
path: "integration_tests/expected_records.txt"
|
||||
full_refresh:
|
||||
tests:
|
||||
- config_path: "secrets/config.json"
|
||||
- config_path: "secrets/config_cdc.json"
|
||||
incremental:
|
||||
tests:
|
||||
- config_path: "secrets/config.json"
|
||||
configured_catalog_path: "integration_tests/incremental_configured_catalog.json"
|
||||
future_state:
|
||||
bypass_reason: "A java.lang.NullPointerException is thrown when a state with an invalid cursor value is passed"
|
||||
- config_path: "secrets/config_cdc.json"
|
||||
configured_catalog_path: "integration_tests/incremental_configured_catalog.json"
|
||||
future_state:
|
||||
bypass_reason: "A java.lang.NullPointerException is thrown when a state with an invalid cursor value is passed"
|
||||
|
||||
0
airbyte-integrations/connectors/source-postgres/acceptance-test-docker.sh
Normal file → Executable file
0
airbyte-integrations/connectors/source-postgres/acceptance-test-docker.sh
Normal file → Executable file
@@ -0,0 +1,5 @@
|
||||
This directory contains files used to run Source Acceptance Tests.
|
||||
* `abnormal_state.json` describes a connector state with a non-existing cursor value.
|
||||
* `expected_records.txt` lists all the records expected as the output of the basic read operation.
|
||||
* `incremental_configured_catalog.json` is a configured catalog used as an input of the `incremental` test.
|
||||
* `seed.sql` is the query we manually ran on a test postgres instance to seed it with test data and enable CDC.
|
||||
@@ -0,0 +1,13 @@
|
||||
[
|
||||
{
|
||||
"type": "STREAM",
|
||||
"stream": {
|
||||
"stream_state": {
|
||||
"id": 4
|
||||
},
|
||||
"stream_descriptor": {
|
||||
"name": "id_and_name"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
{"stream": "id_and_name", "data": {"id": 1, "name": "picard"}, "emitted_at": 999999}
|
||||
{"stream": "id_and_name", "data": {"id": 2, "name": "crusher"}, "emitted_at": 999999}
|
||||
{"stream": "id_and_name", "data": {"id": 3, "name": "vash"}, "emitted_at": 999999}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"streams": [
|
||||
{
|
||||
"stream": {
|
||||
"name": "id_and_name",
|
||||
"json_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "number",
|
||||
"airbyte_type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"supported_sync_modes": [
|
||||
"full_refresh",
|
||||
"incremental"
|
||||
],
|
||||
"default_cursor_field": [],
|
||||
"source_defined_primary_key": [],
|
||||
"namespace": "public"
|
||||
},
|
||||
"sync_mode": "incremental",
|
||||
"destination_sync_mode": "append",
|
||||
"cursor_field": ["id"],
|
||||
"user_defined_primary_key": ["id"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
ALTER ROLE postgres WITH REPLICATION;
|
||||
|
||||
CREATE
|
||||
TABLE
|
||||
id_and_name(
|
||||
id INTEGER,
|
||||
name VARCHAR(200)
|
||||
);
|
||||
|
||||
INSERT
|
||||
INTO
|
||||
id_and_name(
|
||||
id,
|
||||
name
|
||||
)
|
||||
VALUES(
|
||||
1,
|
||||
'picard'
|
||||
),
|
||||
(
|
||||
2,
|
||||
'crusher'
|
||||
),
|
||||
(
|
||||
3,
|
||||
'vash'
|
||||
);
|
||||
|
||||
SELECT
|
||||
pg_create_logical_replication_slot(
|
||||
'debezium_slot',
|
||||
'pgoutput'
|
||||
);
|
||||
|
||||
CREATE
|
||||
PUBLICATION publication FOR ALL TABLES;
|
||||
Reference in New Issue
Block a user