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

force cargo test to run chain sim tests sequentially #1881

Open
wants to merge 5 commits into
base: rc/v0.55.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ version = "{last_release_version}"
clap = {{ version = "4.4.7", features = ["derive"] }}
serde = {{ version = "1.0", features = ["derive"] }}
toml = "0.8.6"
serial_test = {{ version = "3.2.0" }}

[features]
chain-simulator-tests = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,16 @@ pub(crate) fn write_chain_sim_test_to_file(file: &mut File, crate_name: &str) {
file,
r#"use multiversx_sc_snippets::imports::*;
use rust_interact::ContractInteract;
use serial_test::serial;

// Simple deploy test that runs using the chain simulator configuration.
// In order for this test to work, make sure that the `config.toml` file contains the chain simulator config (or choose it manually)
// The chain simulator should already be installed and running before attempting to run this test.
// The chain-simulator-tests feature should be present in Cargo.toml.
// Can be run with `sc-meta test -c`.
// The `#[serial]` attribute should be added to all interactor tests so that we avoid racing problems.
#[tokio::test]
#[serial]
#[cfg_attr(not(feature = "chain-simulator-tests"), ignore)]
async fn deploy_test_{crate_name}_cs() {{
let mut interactor = ContractInteract::new().await;
Expand Down
Loading