Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in sbtc/tests/integration/validation.rs #1063

Open
shanb1605 opened this issue Dec 7, 2024 · 1 comment · May be fixed by #1064
Open

Compilation error in sbtc/tests/integration/validation.rs #1063

shanb1605 opened this issue Dec 7, 2024 · 1 comment · May be fixed by #1064

Comments

@shanb1605
Copy link

shanb1605 commented Dec 7, 2024

Could not compile validation.rs integration test file :(

cargo test --package sbtc --test integration -- validation::tx_validation_from_mempool --exact --show-output --ignored 

   Compiling sbtc v0.1.0 (/Users/stacks-sbtc/sbtc)
error[E0433]: failed to resolve: could not find `testing` in `sbtc`
  --> sbtc/tests/integration/validation.rs:34:11
   |
34 | use sbtc::testing::deposits::TxSetup;
   |           ^^^^^^^ could not find `testing` in `sbtc`
   |

error[E0433]: failed to resolve: could not find `testing` in `sbtc`
  --> sbtc/tests/integration/validation.rs:36:11
   |
36 | use sbtc::testing::regtest::AsUtxo;
   |           ^^^^^^^ could not find `testing` in `sbtc`
   |

error[E0433]: failed to resolve: could not find `testing` in `sbtc`
  --> sbtc/tests/integration/validation.rs:52:36
   |
52 |     let mut setup: TxSetup = sbtc::testing::deposits::tx_setup(lock_time, max_fee, amount_sats);
   |                                    ^^^^^^^ could not find `testing` in `sbtc`
   |
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
warning: `sbtc` (test "integration") generated 1 warning
error: could not compile `sbtc` (test "integration") due to 5 previous errors; 1 warning emitted
@djordon
Copy link
Contributor

djordon commented Dec 7, 2024

Hi @shanb1605, the command you want to use is:

cargo test --package sbtc --features testing --test integration -- validation::tx_validation_from_mempool --exact --show-output --ignored

When trying to run the integration tests in the sbtc crate through VS Code, one solution is to add "testing" to the default feature in sbtc/Cargo.toml. I know that we need to fix this up, and we'll get to it.

@shanb1605 shanb1605 linked a pull request Dec 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants