sbtc-developer-release
sbtc-developer-release copied to clipboard
Integration tests with devenv as backend.
Summary of Changes
- File structure for integration tests.
- Ignore integration files in coverage.
- Let docker assign ports and container names.
- Deploy contracts.
- Add a Readme.
- Add a weak test for broadcasting deposits.
Testing
Replicate behavior in deposit.sh
Risks
Low risk, break devenv due to changes in configuration.
How were these changes tested?
Manual testing of the integration pipeline. Follow the Readme to replicate.
What future testing should occur?
The tests I included are not complete. I don't assert on pre and post-conditions. In another PR we need to enable integration CI and finish the tests.
Checklist:
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes
- [X] Any dependent changes have been merged and published in downstream modules
Codecov Report
Attention: 76 lines
in your changes are missing coverage. Please review.
Comparison is base (
6470223
) 43.44% compared to head (e07fd1c
) 43.01%. Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #215 +/- ##
==========================================
- Coverage 43.44% 43.01% -0.43%
==========================================
Files 45 45
Lines 5467 5521 +54
Branches 47 47
==========================================
Hits 2375 2375
- Misses 3091 3145 +54
Partials 1 1
Flag | Coverage Δ | |
---|---|---|
unittests | 76.61% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@friedger Almost there. I just added clarinet deployments. I may add a deposit or withdrawal test tomorrow based on the script you shared a few days ago.
Where would I see the result of the test?
When you run the tests. You will see the container id such as:
with container id: ead4e29d30292d22d96d2f13e2be183b6e49d8a9a0d87a6f752a5c144d096ad4
You can use the container id with devenv/logs.sh
I recommend another terminal watching specific services or the testing container itself while you wait for it to finish.
devenv$ ./log.sh ead4e29d30292d22d96d2f13e2be183b6e49d8a9a0d87a6f752a5c144d096ad4
If the tests fails the script will print the logs for you, which is the case so far ^^.
Changing devenv is high risk as this is part of the product for the hackathon
~~I must merge the latest main changes, but the workflow remains valid.~~ done.
blocked by #350 and #307