-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8973a8f
commit 72e25ff
Showing
9 changed files
with
125 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,46 @@ | ||
# Running Standard Source Tests | ||
# Standard tests | ||
This package uses pytest to discover, configure and execute the tests. | ||
It implemented as a pytest plugin. | ||
|
||
It adds new configuration option `--standard_test_config` - path to configuration file (by default is current folder). | ||
Configuration stored in YaML format and validated by pydantic. | ||
|
||
Example configuration can be found in `sample_files/` folder: | ||
```yaml | ||
connector_image: <your_image> | ||
tests: | ||
spec: | ||
- spec_path: "<connector_folder>/spec.json" | ||
connection: | ||
- config_path: "secrets/config.json" | ||
status: "succeed" | ||
- config_path: "sample_files/invalid_config.json" | ||
status: "exception" | ||
discovery: | ||
- config_path: "secrets/config.json" | ||
basic_read: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "sample_files/configured_catalog.json" | ||
validate_output_from_all_streams: true | ||
incremental: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "sample_files/configured_catalog.json" | ||
state_path: "sample_files/abnormal_state.json" | ||
cursor_paths: | ||
subscription_changes: ["timestamp"] | ||
email_events: ["timestamp"] | ||
full_refresh: | ||
- config_path: "secrets/config.json" | ||
configured_catalog_path: "sample_files/configured_catalog.json" | ||
``` | ||
# Running | ||
```bash | ||
python -m pytest standard_test/tests --standard_test_config=../../connectors/source-hubspot/ -vvv | ||
python -m pytest standard_test/tests --standard_test_config=<path_to_your_connector> -vvv | ||
``` | ||
_Note: this will assume that docker image for connector is already built_ | ||
|
||
## How to | ||
TODO | ||
Using Gradle | ||
```bash | ||
./gradlew :airbyte-integrations:connectors:source-<name>:standardTest | ||
``` | ||
_Note: this will also build docker image for connector_ |
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
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
Oops, something went wrong.