forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Zendesk Sunshine Source Connector to Low Code (airbytehq#29310)
Co-authored-by: Mal Hancock <mallory@archangelic.space> Co-authored-by: marcosmarxm <marcosmarxm@gmail.com> Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
- Loading branch information
Showing
19 changed files
with
419 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-zendesk-sunshine/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
57 changes: 27 additions & 30 deletions
57
airbyte-integrations/connectors/source-zendesk-sunshine/acceptance-test-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,34 @@ | ||
# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-zendesk-sunshine:dev | ||
tests: | ||
spec: | ||
- spec_path: "source_zendesk_sunshine/spec.json" | ||
test_strictness_level: low | ||
acceptance_tests: | ||
connection: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "secrets/config_oauth.json" | ||
status: "succeed" | ||
- config_path: "secrets/config_api_token.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config.json" | ||
status: "failed" | ||
- config_path: "integration_tests/invalid_config_api_token.json" | ||
status: "failed" | ||
- config_path: "integration_tests/invalid_config_oauth.json" | ||
status: "failed" | ||
tests: | ||
- config_path: "secrets/config_oauth.json" | ||
status: "succeed" | ||
- config_path: "secrets/config_api_token.json" | ||
status: "succeed" | ||
- config_path: "integration_tests/invalid_config_api_token.json" | ||
status: "failed" | ||
- config_path: "integration_tests/invalid_config_oauth.json" | ||
status: "failed" | ||
discovery: | ||
- config_path: "secrets/config.json" | ||
backward_compatibility_tests_config: | ||
disable_for_version: "0.1.1" | ||
tests: | ||
- config_path: "secrets/config_oauth.json" | ||
backward_compatibility_tests_config: | ||
disable_for_version: "0.1.1" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
- config_path: "secrets/config_api_token.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
- config_path: "secrets/config_oauth.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
# incremental: # complex state ( {parent_id: {cur_field: value}} still not supported ) | ||
# - config_path: "secrets/config.json" | ||
# configured_catalog_path: "integration_tests/configured_catalog.json" | ||
# future_state_path: "integration_tests/abnormal_state.json" | ||
tests: | ||
- config_path: "secrets/config_api_token.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
- config_path: "secrets/config_oauth.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
# incremental: # complex state ( {parent_id: {cur_field: value}} still not supported ) | ||
# - config_path: "secrets/config.json" | ||
# configured_catalog_path: "integration_tests/configured_catalog.json" | ||
# future_state_path: "integration_tests/abnormal_state.json" | ||
full_refresh: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" | ||
tests: | ||
- config_path: "secrets/config_oauth.json" | ||
configured_catalog_path: "integration_tests/configured_catalog.json" |
1 change: 1 addition & 0 deletions
1
airbyte-integrations/connectors/source-zendesk-sunshine/acceptance-test-docker.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
5 changes: 5 additions & 0 deletions
5
...yte-integrations/connectors/source-zendesk-sunshine/integration_tests/abnormal_state.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"todo-stream-name": { | ||
"todo-field-name": "todo-abnormal-value" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-zendesk-sunshine/integration_tests/sample_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"fix-me": "TODO" | ||
} |
5 changes: 5 additions & 0 deletions
5
airbyte-integrations/connectors/source-zendesk-sunshine/integration_tests/sample_state.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"todo-stream-name": { | ||
"todo-field-name": "value" | ||
} | ||
} |
19 changes: 12 additions & 7 deletions
19
airbyte-integrations/connectors/source-zendesk-sunshine/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 3 additions & 22 deletions
25
airbyte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...yte-integrations/connectors/source-zendesk-sunshine/source_zendesk_sunshine/components.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
from dataclasses import dataclass | ||
from typing import Any, Mapping | ||
|
||
from airbyte_cdk.sources.declarative.auth.declarative_authenticator import DeclarativeAuthenticator | ||
from airbyte_cdk.sources.declarative.auth.token import BasicHttpAuthenticator, BearerAuthenticator | ||
|
||
|
||
@dataclass | ||
class AuthenticatorZendeskSunshine(DeclarativeAuthenticator): | ||
config: Mapping[str, Any] | ||
basic_auth: BasicHttpAuthenticator | ||
oauth2: BearerAuthenticator | ||
|
||
def __new__(cls, basic_auth, oauth2, config, *args, **kwargs): | ||
if config["credentials"]["auth_method"] == "api_token": | ||
return basic_auth | ||
else: | ||
return oauth2 |
Oops, something went wrong.