Running certain tests results in compilation errors similar to:
Compiling mc-block-import v0.7.0 (/home/stephen/dev/msl/starkware/madara/crates/client/block_import)
error[E0599]: no function or associated item named `open_for_testing` found for struct `mc_db::MadaraBackend` in the current scope
--> crates/client/block_import/src/verify_apply.rs:343:24
|
343 | MadaraBackend::open_for_testing(chain_config.clone())
| ^^^^^^^^^^^^^^^^ function or associated item not found in `MadaraBackend
This is related to the testing feature flag not being passed to the crate. One workaround is to add a testing feature to the given crate such as:
testing = ["mc-db/testing"]
And then run tests with this feature, e.g.:
cargo test -p mc-block-import --features=testing
Steps to reproduce
Run cargo test -p mc-block-import from the project root directory.
Or attempt to run any tests in verify_apply.rs in VSCode.
Is there an existing issue?
Description of bug
Running certain tests results in compilation errors similar to:
This is related to the
testing
feature flag not being passed to the crate. One workaround is to add a testing feature to the given crate such as:And then run tests with this feature, e.g.:
Steps to reproduce
Run
cargo test -p mc-block-import
from the project root directory.Or attempt to run any tests in
verify_apply.rs
in VSCode.