-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 Update hardway tutorial & generic source template to use SAT (#11908)
- Loading branch information
1 parent
ba48d40
commit b85c513
Showing
12 changed files
with
124 additions
and
109 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
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
1 change: 0 additions & 1 deletion
1
airbyte-integrations/connector-templates/source-generic/.gitignore.hbs
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connector-templates/source-generic/Dockerfile
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
15 changes: 0 additions & 15 deletions
15
airbyte-integrations/connector-templates/source-generic/NEW_SOURCE_CHECKLIST.md.hbs
This file was deleted.
Oops, something went wrong.
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
airbyte-integrations/connector-templates/source-generic/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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-{{dashCase name}}:dev | ||
tests: | ||
spec: | ||
- spec_path: "spec.json" | ||
config_path: "secrets/valid_config.json" # TODO add this file | ||
connection: | ||
- config_path: "secrets/valid_config.json" # TODO add this file | ||
status: "succeed" | ||
- config_path: "secrets/invalid_config.json" # TODO add this file | ||
status: "failed" | ||
discovery: | ||
- config_path: "secrets/valid_config.json" | ||
basic_read: | ||
- config_path: "secrets/valid_config.json" | ||
configured_catalog_path: "fullrefresh_configured_catalog.json" # TODO add or change this file | ||
empty_streams: [] | ||
full_refresh: | ||
- config_path: "secrets/valid_config.json" | ||
configured_catalog_path: "fullrefresh_configured_catalog.json" # TODO add or change this file | ||
# incremental: # TODO uncomment this once you implement incremental sync | ||
# - config_path: "secrets/config.json" | ||
# configured_catalog_path: "integration_tests/configured_catalog.json" | ||
# future_state_path: "integration_tests/abnormal_state.json" |
16 changes: 16 additions & 0 deletions
16
airbyte-integrations/connector-templates/source-generic/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,16 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Build latest connector image | ||
docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2-) | ||
|
||
# Pull latest acctest image | ||
docker pull airbyte/source-acceptance-test:latest | ||
|
||
# Run | ||
docker run --rm -it \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v /tmp:/tmp \ | ||
-v $(pwd):/test_input \ | ||
airbyte/source-acceptance-test \ | ||
--acceptance-test-config /test_input | ||
|
15 changes: 2 additions & 13 deletions
15
airbyte-integrations/connector-templates/source-generic/build.gradle
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,17 +1,6 @@ | ||
plugins { | ||
// Makes building the docker image a dependency of Gradle's "build" command. This way you could run your entire build inside a docker image | ||
// via ./gradlew :airbyte-integrations:connectors:source-{{snakeCase name}}:build | ||
// via ./gradlew :airbyte-integrations:connectors:source-{{dashCase name}}:build | ||
id 'airbyte-docker' | ||
id 'airbyte-standard-source-test-file' | ||
} | ||
|
||
airbyteStandardSourceTestFile { | ||
// All these input paths must live inside this connector's directory (or subdirectories) | ||
configPath = "<path to config file to be used in standard tests>" // TODO | ||
configuredCatalogPath = "<path to configured catalog to be used in tests>" // TODO | ||
specPath = "<path to spec for use in tests>" // TODO | ||
} | ||
|
||
dependencies { | ||
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) | ||
id 'airbyte-source-acceptance-test' | ||
} |
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