Skip to content

Commit

Permalink
ignore tendermint dockerized tests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
shamardy committed Aug 5, 2024
1 parent 9b01339 commit 6830a0c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
4 changes: 4 additions & 0 deletions mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ pub fn geth_docker_node<'a>(docker: &'a Cli, ticker: &'static str, port: u16) ->
}
}

#[allow(dead_code)]
pub fn nucleus_node(docker: &'_ Cli, runtime_dir: PathBuf) -> DockerNode<'_> {
let nucleus_node_runtime_dir = runtime_dir.join("nucleus-testnet-data");
assert!(nucleus_node_runtime_dir.exists());
Expand All @@ -393,6 +394,7 @@ pub fn nucleus_node(docker: &'_ Cli, runtime_dir: PathBuf) -> DockerNode<'_> {
}
}

#[allow(dead_code)]
pub fn atom_node(docker: &'_ Cli, runtime_dir: PathBuf) -> DockerNode<'_> {
let atom_node_runtime_dir = runtime_dir.join("atom-testnet-data");
assert!(atom_node_runtime_dir.exists());
Expand All @@ -409,6 +411,7 @@ pub fn atom_node(docker: &'_ Cli, runtime_dir: PathBuf) -> DockerNode<'_> {
}
}

#[allow(dead_code)]
pub fn ibc_relayer_node(docker: &'_ Cli, runtime_dir: PathBuf) -> DockerNode<'_> {
let relayer_node_runtime_dir = runtime_dir.join("ibc-relayer-data");
assert!(relayer_node_runtime_dir.exists());
Expand Down Expand Up @@ -1145,6 +1148,7 @@ async fn get_current_gas_limit(web3: &Web3<Http>) {
}
}

#[allow(dead_code)]
pub fn wait_until_relayer_container_is_ready(container_id: &str) {
const Q_RESULT: &str = "0: nucleus-atom -> chns(✔) clnts(✔) conn(✔) (nucleus-testnet<>cosmoshub-testnet)";

Expand Down
17 changes: 17 additions & 0 deletions mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const TENDERMINT_TEST_BIP39_SEED: &str =
"emerge canoe salmon dolphin glow priority random become gasp sell blade argue";

#[test]
#[ignore]
fn test_tendermint_balance() {
let coins = json!([atom_testnet_conf()]);
let coin = coins[0]["coin"].as_str().unwrap();
Expand All @@ -45,6 +46,7 @@ fn test_tendermint_balance() {
}

#[test]
#[ignore]
fn test_tendermint_activation_without_balance() {
let coins = json!([atom_testnet_conf()]);
let coin = coins[0]["coin"].as_str().unwrap();
Expand All @@ -67,6 +69,7 @@ fn test_tendermint_activation_without_balance() {
}

#[test]
#[ignore]
fn test_iris_ibc_nucleus_without_balance() {
let coins = json!([nucleus_testnet_conf(), iris_ibc_nucleus_testnet_conf()]);

Expand Down Expand Up @@ -94,6 +97,7 @@ fn test_iris_ibc_nucleus_without_balance() {
}

#[test]
#[ignore]
fn test_iris_ibc_nucleus_orderbook() {
let coins = json!([nucleus_testnet_conf(), iris_ibc_nucleus_testnet_conf()]);
let platform_coin = coins[0]["coin"].as_str().unwrap();
Expand Down Expand Up @@ -142,6 +146,7 @@ fn test_iris_ibc_nucleus_orderbook() {
}

#[test]
#[ignore]
fn test_tendermint_hd_address() {
let coins = json!([atom_testnet_conf()]);
let coin = coins[0]["coin"].as_str().unwrap();
Expand All @@ -158,6 +163,7 @@ fn test_tendermint_hd_address() {
}

#[test]
#[ignore]
fn test_tendermint_withdraw() {
const MY_ADDRESS: &str = "cosmos150evuj4j7k9kgu38e453jdv9m3u0ft2n53flg6";

Expand Down Expand Up @@ -215,6 +221,7 @@ fn test_tendermint_withdraw() {
}

#[test]
#[ignore]
fn test_tendermint_withdraw_hd() {
const MY_ADDRESS: &str = "cosmos134h9tv7866jcuw708w5w76lcfx7s3x2ysyalxy";

Expand Down Expand Up @@ -282,6 +289,7 @@ fn test_tendermint_withdraw_hd() {
}

#[test]
#[ignore]
fn test_custom_gas_limit_on_tendermint_withdraw() {
let coins = json!([atom_testnet_conf()]);
let coin = coins[0]["coin"].as_str().unwrap();
Expand Down Expand Up @@ -312,6 +320,7 @@ fn test_custom_gas_limit_on_tendermint_withdraw() {
}

#[test]
#[ignore]
fn test_tendermint_ibc_withdraw() {
// visit `{swagger_address}/ibc/core/channel/v1/channels?pagination.limit=10000` to see the full list of ibc channels
const IBC_SOURCE_CHANNEL: &str = "channel-1";
Expand Down Expand Up @@ -358,6 +367,7 @@ fn test_tendermint_ibc_withdraw() {
}

#[test]
#[ignore]
fn test_tendermint_ibc_withdraw_hd() {
// visit `{swagger_address}/ibc/core/channel/v1/channels?pagination.limit=10000` to see the full list of ibc channels
const IBC_SOURCE_CHANNEL: &str = "channel-1";
Expand Down Expand Up @@ -405,6 +415,7 @@ fn test_tendermint_ibc_withdraw_hd() {
}

#[test]
#[ignore]
fn test_tendermint_token_withdraw() {
const MY_ADDRESS: &str = "nuc150evuj4j7k9kgu38e453jdv9m3u0ft2n4fgzfr";

Expand Down Expand Up @@ -485,6 +496,7 @@ fn test_tendermint_token_withdraw() {
}

#[test]
#[ignore]
fn test_tendermint_tx_history() {
const TEST_SEED: &str = "Vdo8Xt8pTAetRlMq3kV0LzE393eVYbPSn5Mhtw4p";
const TX_FINISHED_LOG: &str = "Tx history fetching finished for NUCLEUS-TEST.";
Expand Down Expand Up @@ -561,6 +573,7 @@ fn test_tendermint_tx_history() {
}

#[test]
#[ignore]
fn test_disable_tendermint_platform_coin_with_token() {
let coins = json!([nucleus_testnet_conf(), iris_ibc_nucleus_testnet_conf()]);
let platform_coin = coins[0]["coin"].as_str().unwrap();
Expand Down Expand Up @@ -597,6 +610,7 @@ fn test_disable_tendermint_platform_coin_with_token() {
}

#[test]
#[ignore]
fn test_passive_coin_and_force_disable() {
let coins = json!([nucleus_testnet_conf(), iris_ibc_nucleus_testnet_conf()]);
let platform_coin = coins[0]["coin"].as_str().unwrap();
Expand Down Expand Up @@ -673,6 +687,7 @@ mod swap {
const ALICE_PASSPHRASE: &str = "iris test2 seed";

#[test]
#[ignore]
fn swap_nucleus_with_doc() {
let bob_passphrase = String::from(BOB_PASSPHRASE);
let alice_passphrase = String::from(ALICE_PASSPHRASE);
Expand Down Expand Up @@ -751,6 +766,7 @@ mod swap {
}

#[test]
#[ignore]
fn swap_nucleus_with_eth() {
let bob_passphrase = String::from(BOB_PASSPHRASE);
let alice_passphrase = String::from(ALICE_PASSPHRASE);
Expand Down Expand Up @@ -857,6 +873,7 @@ mod swap {
}

#[test]
#[ignore]
fn swap_doc_with_iris_ibc_nucleus() {
let bob_passphrase = String::from(BOB_PASSPHRASE);
let alice_passphrase = String::from(ALICE_PASSPHRASE);
Expand Down
24 changes: 13 additions & 11 deletions mm2src/mm2_main/tests/docker_tests_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) {
UTXO_ASSET_DOCKER_IMAGE_WITH_TAG,
QTUM_REGTEST_DOCKER_IMAGE_WITH_TAG,
GETH_DOCKER_IMAGE_WITH_TAG,
NUCLEUS_IMAGE,
ATOM_IMAGE,
IBC_RELAYER_IMAGE,
// NUCLEUS_IMAGE,
// ATOM_IMAGE,
// IBC_RELAYER_IMAGE,
];

for image in IMAGES {
pull_docker_image(image);
remove_docker_containers(image);
}

let runtime_dir = prepare_runtime_dir().unwrap();
// let runtime_dir = prepare_runtime_dir().unwrap();

let nucleus_node = nucleus_node(&docker, runtime_dir.clone());
let atom_node = atom_node(&docker, runtime_dir.clone());
let ibc_relayer_node = ibc_relayer_node(&docker, runtime_dir);
// let nucleus_node = nucleus_node(&docker, runtime_dir.clone());
// let atom_node = atom_node(&docker, runtime_dir.clone());
// let ibc_relayer_node = ibc_relayer_node(&docker, runtime_dir);
let utxo_node = utxo_asset_docker_node(&docker, "MYCOIN", 7000);
let utxo_node1 = utxo_asset_docker_node(&docker, "MYCOIN1", 8000);
let qtum_node = qtum_docker_node(&docker, 9000);
Expand All @@ -90,16 +90,16 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) {

wait_for_geth_node_ready();
init_geth_node();
wait_until_relayer_container_is_ready(ibc_relayer_node.container.id());
// wait_until_relayer_container_is_ready(ibc_relayer_node.container.id());

containers.push(utxo_node);
containers.push(utxo_node1);
containers.push(qtum_node);
containers.push(for_slp_node);
containers.push(geth_node);
containers.push(nucleus_node);
containers.push(atom_node);
containers.push(ibc_relayer_node);
// containers.push(nucleus_node);
// containers.push(atom_node);
// containers.push(ibc_relayer_node);
}
// detect if docker is installed
// skip the tests that use docker if not installed
Expand Down Expand Up @@ -172,6 +172,8 @@ fn remove_docker_containers(name: &str) {
.expect("Failed to execute docker command");
}
}

#[allow(dead_code)]
fn prepare_runtime_dir() -> std::io::Result<PathBuf> {
let project_root = {
let mut current_dir = std::env::current_dir().unwrap();
Expand Down

0 comments on commit 6830a0c

Please sign in to comment.