* Move ci_connector_ops
* Move ci_credentials
* Move tools/ci_common_utils
* Rename tools to airbyte-ci
* Move to ci
* Convert ci_credentials
* Convert ci_common_utls
* Convert ci_connector_ops
* Get pipelines running
* Move pipelines to own poetry project
* Update readme
* Delete
* Add ci_code_validator
* Use pipx to install gha deps
* Fix'
* Ensure every thing is running
* Automated Commit - Formatting Changes
* Gitignore miss
* Add pipx installer
* Get local pipx dependencies
* Fix paths
* Install pipx
* ceremonial source-faker change
* Add installation step for ci_code_validator
* Add comment
* remove ci_code_validator
* Address code review comments
* add pipx install to acceptance-test-docker.sh
* Run formater
* Revert "ceremonial source-faker change"
This reverts commit 26884cd0db.
* gitignore lecacy pipeline report path
* update poetry.lock
* skip upload if logs do not exist
---------
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
2.0 KiB
Testing Connectors
Our testing pyramid
Multiple tests suites compose the Airbyte connector testing pyramid: Connector specific tests declared in the connector code directory:
- Unit tests
- Integration tests
Tests common to all connectors:
Running tests
Unit and integration tests can be run directly from the connector code.
Using pytest for Python connectors:
python -m pytest unit_tests/
python -m pytest integration_tests/
Using gradle for Java connectors:
./gradlew :airbyte-integrations:connectors:source-postgres:test
./gradlew :airbyte-integrations:connectors:source-postgres:integrationTestJava
Please note that according to the test implementation you might have to provide connector configurations as a config.json file in a .secrets folder in the connector code directory.
If you want to run the global test suite, exactly like what is run in CI, you should install airbyte-ci CLI and use the following command:
airbyte-ci connectors --name=<connector_name> test
This will run all the tests for the connector, including the QA checks and the Connector Acceptance tests.
Connector Acceptance tests require connector configuration to be provided as a config.json file in a .secrets folder in the connector code directory.
Tests on pull requests
Our CI infrastructure runs the connector tests with airbyte-ci CLI. Connectors tests are automatically and remotely triggered on your branch according to the changes made in your branch.
Passing tests are required to merge a connector pull request.