add integration test harness with tinybird-local #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Tinybird local allows us to do integration testing of the SDK directly in CI without a tinybird account. This will be super helpful as we make more changes to the SDK. Moreover, providing some utilities to make it easier to start up tb local and deploying projects programmatically as part of tests can be useful for downstream projects.
This PR introduces an integration testing harness that automatically spins up tinybird-local, deploys a test project, and then runs tests against it. This is fully integrated into pytest, so no external commands need to be run first, only pytest.
The main new concepts are
TinybirdLocalContainerandTinybirdCli, which allow us to programmatically interact with the tb cli and tinybird local. There's also atests/integrationfolder which has fixtures that automatically start up tinybird local and deploy the test project to it.Changes