Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Integration tests with devenv as backend. #215

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

CAGS295
Copy link
Contributor

@CAGS295 CAGS295 commented Oct 4, 2023

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:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@CAGS295 CAGS295 added alpha-romeo devenv Development Environment labels Oct 4, 2023
@codecov
Copy link

codecov bot commented Oct 4, 2023

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.

Files Patch % Lines
romeo/src/stacks_client.rs 0.00% 36 Missing ⚠️
sbtc-cli/src/main.rs 0.00% 14 Missing ⚠️
stacks-core/src/address.rs 0.00% 13 Missing ⚠️
sbtc-cli/src/commands/deposit.rs 0.00% 10 Missing ⚠️
sbtc-cli/src/commands/broadcast.rs 0.00% 2 Missing ⚠️
romeo/src/system.rs 0.00% 1 Missing ⚠️
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.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CAGS295 CAGS295 force-pushed the dev/integration-setup branch 2 times, most recently from cbc51aa to abddb42 Compare October 4, 2023 07:11
@CAGS295 CAGS295 changed the title WIP: First integration test WIP: The first integration test Oct 4, 2023
@CAGS295 CAGS295 self-assigned this Oct 4, 2023
@CAGS295
Copy link
Contributor Author

CAGS295 commented Oct 4, 2023

@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.

@CAGS295 CAGS295 force-pushed the dev/integration-setup branch from abddb42 to 9f178af Compare October 5, 2023 07:33
@CAGS295 CAGS295 force-pushed the dev/integration-setup branch 5 times, most recently from a0d3aa0 to 9c56930 Compare October 6, 2023 07:33
@friedger
Copy link
Collaborator

friedger commented Oct 6, 2023

Where would I see the result of the test?

@CAGS295
Copy link
Contributor Author

CAGS295 commented Oct 6, 2023

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 ^^.

@CAGS295 CAGS295 force-pushed the dev/integration-setup branch from 9c56930 to b65d28f Compare October 7, 2023 00:55
@CAGS295 CAGS295 force-pushed the dev/integration-setup branch 9 times, most recently from b0ccfef to 079fd12 Compare October 13, 2023 02:46
@CAGS295 CAGS295 force-pushed the dev/integration-setup branch from e651c91 to aed33a2 Compare November 11, 2023 04:08
@CAGS295 CAGS295 force-pushed the dev/integration-setup branch from 5bf3c15 to e07fd1c Compare November 14, 2023 00:13
@CLAassistant
Copy link

CLAassistant commented Nov 16, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
alpha-romeo devenv Development Environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants