Skip to content

Commit bfc8249

Browse files
Source slack: fix integration tests (#16050)
* #9221 source slack: fix integration tests * #9221 source slack: upd changelog * #9221 source slack - remove channel messages from expected records * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
1 parent 1113ec0 commit bfc8249

File tree

17 files changed

+755
-643
lines changed

17 files changed

+755
-643
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@
924924
- name: Slack
925925
sourceDefinitionId: c2281cee-86f9-4a86-bb48-d23286b4c7bd
926926
dockerRepository: airbyte/source-slack
927-
dockerImageTag: 0.1.15
927+
dockerImageTag: 0.1.16
928928
documentationUrl: https://docs.airbyte.io/integrations/sources/slack
929929
icon: slack.svg
930930
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9033,7 +9033,7 @@
90339033
supportsNormalization: false
90349034
supportsDBT: false
90359035
supported_destination_sync_modes: []
9036-
- dockerImage: "airbyte/source-slack:0.1.15"
9036+
- dockerImage: "airbyte/source-slack:0.1.16"
90379037
spec:
90389038
documentationUrl: "https://docs.airbyte.io/integrations/sources/slack"
90399039
connectionSpecification:
@@ -9073,7 +9073,7 @@
90739073
default: []
90749074
items:
90759075
type: "string"
9076-
min-item: 0
9076+
minLength: 0
90779077
title: "Channel name filter"
90789078
description: "A channel name list (without leading '#' char) which limit\
90799079
\ the channels from which you'd like to sync. Empty list means no filter."

airbyte-integrations/connectors/source-slack/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ ENV CODE_PATH="source_slack"
77
ENV WORKDIR=/airbyte/integration_code
88

99
WORKDIR $WORKDIR
10-
COPY $CODE_PATH ./$CODE_PATH
11-
COPY setup.py ./
12-
COPY main.py ./
1310

11+
COPY setup.py ./
1412
RUN pip install .
1513

14+
COPY $CODE_PATH ./$CODE_PATH
15+
COPY main.py ./
16+
1617
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1718
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1819

19-
LABEL io.airbyte.version=0.1.15
20+
LABEL io.airbyte.version=0.1.16
2021
LABEL io.airbyte.name=airbyte/source-slack

airbyte-integrations/connectors/source-slack/acceptance-test-config.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ connector_image: airbyte/source-slack:dev
22
tests:
33
spec:
44
- spec_path: "source_slack/spec.json"
5+
backward_compatibility_tests_config:
6+
disable_for_version: "0.1.15"
57
connection:
68
- config_path: "secrets/config.json"
79
status: "succeed"
@@ -16,12 +18,12 @@ tests:
1618
basic_read:
1719
- config_path: "secrets/config.json"
1820
configured_catalog_path: "integration_tests/full_refresh_catalog.json"
19-
timeout_seconds: 7200
21+
expect_records:
22+
path: "integration_tests/expected_records.txt"
2023
incremental:
2124
- config_path: "secrets/config.json"
22-
configured_catalog_path: "integration_tests/configured_catalog.json"
23-
timeout_seconds: 7200
25+
configured_catalog_path: "integration_tests/incremental_catalog.json"
26+
future_state_path: "integration_tests/abnormal_state.json"
2427
full_refresh:
2528
- config_path: "secrets/config.json"
26-
configured_catalog_path: "integration_tests/full_refresh_catalog.json"
27-
timeout_seconds: 7200
29+
configured_catalog_path: "integration_tests/full_refresh_catalog.json"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"threads": { "ts": 7270247822 },
3-
"channel_messages": { "ts": 7270247822 }
2+
"threads": { "float_ts": 7270247822 },
3+
"channel_messages": { "float_ts": 7270247822 }
44
}

airbyte-integrations/connectors/source-slack/integration_tests/expected_records.txt

Lines changed: 35 additions & 0 deletions
Large diffs are not rendered by default.

airbyte-integrations/connectors/source-slack/integration_tests/full_refresh_catalog.json

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,62 @@
44
"stream": {
55
"name": "channels",
66
"json_schema": {},
7-
"supported_sync_modes": ["full_refresh"]
7+
"supported_sync_modes": ["full_refresh"],
8+
"source_defined_primary_key": [["id"]]
89
},
910
"sync_mode": "full_refresh",
10-
"destination_sync_mode": "overwrite"
11+
"destination_sync_mode": "overwrite",
12+
"primary_key": [["id"]]
1113
},
1214
{
1315
"stream": {
1416
"name": "users",
1517
"json_schema": {},
16-
"supported_sync_modes": ["full_refresh"]
18+
"supported_sync_modes": ["full_refresh"],
19+
"source_defined_primary_key": [["id"]]
1720
},
1821
"sync_mode": "full_refresh",
19-
"destination_sync_mode": "overwrite"
22+
"destination_sync_mode": "overwrite",
23+
"primary_key": [["id"]]
24+
},
25+
{
26+
"stream": {
27+
"name": "channel_messages",
28+
"json_schema": {},
29+
"supported_sync_modes": ["full_refresh", "incremental"],
30+
"source_defined_cursor": true,
31+
"default_cursor_field": ["float_ts"],
32+
"source_defined_primary_key": [["channel_id"], ["ts"]]
33+
},
34+
"cursor_field": ["float_ts"],
35+
"sync_mode": "full_refresh",
36+
"destination_sync_mode": "overwrite",
37+
"primary_key": [["channel_id"], ["ts"]]
38+
},
39+
{
40+
"stream": {
41+
"name": "threads",
42+
"json_schema": {},
43+
"supported_sync_modes": ["full_refresh", "incremental"],
44+
"source_defined_cursor": true,
45+
"default_cursor_field": ["float_ts"],
46+
"source_defined_primary_key": [["channel_id"], ["ts"]]
47+
},
48+
"cursor_field": ["float_ts"],
49+
"sync_mode": "full_refresh",
50+
"destination_sync_mode": "overwrite",
51+
"primary_key": [["channel_id"], ["ts"]]
52+
},
53+
{
54+
"stream": {
55+
"name": "channel_members",
56+
"json_schema": {},
57+
"supported_sync_modes": ["full_refresh"],
58+
"source_defined_primary_key": [["member_id"], ["channel_id"]]
59+
},
60+
"sync_mode": "full_refresh",
61+
"destination_sync_mode": "overwrite",
62+
"primary_key": [["member_id"], ["channel_id"]]
2063
}
2164
]
2265
}

airbyte-integrations/connectors/source-slack/integration_tests/configured_catalog.json renamed to airbyte-integrations/connectors/source-slack/integration_tests/incremental_catalog.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@
66
"json_schema": {},
77
"supported_sync_modes": ["full_refresh", "incremental"],
88
"source_defined_cursor": true,
9-
"default_cursor_field": ["float_ts"]
9+
"default_cursor_field": ["float_ts"],
10+
"source_defined_primary_key": [["channel_id"], ["ts"]]
1011
},
1112
"cursor_field": ["float_ts"],
1213
"sync_mode": "incremental",
13-
"destination_sync_mode": "append"
14+
"destination_sync_mode": "append",
15+
"primary_key": [["channel_id"], ["ts"]]
1416
},
1517
{
1618
"stream": {
1719
"name": "threads",
1820
"json_schema": {},
1921
"supported_sync_modes": ["full_refresh", "incremental"],
2022
"source_defined_cursor": true,
21-
"default_cursor_field": ["float_ts"]
23+
"default_cursor_field": ["float_ts"],
24+
"source_defined_primary_key": [["channel_id"], ["ts"]]
2225
},
2326
"cursor_field": ["float_ts"],
2427
"sync_mode": "incremental",
25-
"destination_sync_mode": "append"
28+
"destination_sync_mode": "append",
29+
"primary_key": [["channel_id"], ["ts"]]
2630
}
2731
]
2832
}

airbyte-integrations/connectors/source-slack/integration_tests/integration_test.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

airbyte-integrations/connectors/source-slack/integration_tests/sample_config.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)