From 73491ad0cb38da66556334a8f3f62f92fb458072 Mon Sep 17 00:00:00 2001 From: Maciek Malik Date: Thu, 18 Jul 2024 13:35:48 +0200 Subject: [PATCH 1/3] Add and fix Solana docker tests Add Dockerfile to run local solana validator for tests --- .docker/Dockerfile.solana-tests | 15 +++++ .../tests/docker_tests/docker_tests_common.rs | 65 +++++++++++-------- .../tests/docker_tests/qrc20_tests.rs | 3 +- .../mm2_main/tests/docker_tests/slp_tests.rs | 4 +- .../tests/docker_tests/solana_tests.rs | 17 +++-- .../tests/docker_tests/tendermint_tests.rs | 4 +- mm2src/mm2_main/tests/docker_tests_main.rs | 12 ++-- 7 files changed, 79 insertions(+), 41 deletions(-) create mode 100644 .docker/Dockerfile.solana-tests diff --git a/.docker/Dockerfile.solana-tests b/.docker/Dockerfile.solana-tests new file mode 100644 index 0000000000..5271bc7ab9 --- /dev/null +++ b/.docker/Dockerfile.solana-tests @@ -0,0 +1,15 @@ +FROM rust:1.79 + +WORKDIR /root + +RUN apt -y update && apt -y install curl bzip2 + +RUN sh -c "$(curl -sSfL https://release.solana.com/v1.17.13/install)" + +ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}" + +RUN solana-keygen new --no-bip39-passphrase + +COPY .docker/devnet-accounts/ /root/accounts/ + +ENTRYPOINT ["solana-test-validator", "--bpf-program", "3fystoi7pB1cnDEbRRpSjFJA4fG3W2vQQZ21jSrBc11B", "/root/accounts/program1_11B.so", "--account-dir", "/root/accounts", "--reset"] diff --git a/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs b/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs index 0066f00139..818c2e68ea 100644 --- a/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs +++ b/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs @@ -1,14 +1,21 @@ -pub use common::{block_on, now_ms, now_sec, wait_until_ms, wait_until_sec}; -pub use mm2_number::MmNumber; -use mm2_rpc::data::legacy::BalanceResponse; -pub use mm2_test_helpers::for_tests::{check_my_swap_status, check_recent_swaps, enable_eth_coin, enable_native, - enable_native_bch, erc20_dev_conf, eth_dev_conf, eth_sepolia_conf, - jst_sepolia_conf, mm_dump, wait_check_stats_swap_status, MarketMakerIt, - MAKER_ERROR_EVENTS, MAKER_SUCCESS_EVENTS, TAKER_ERROR_EVENTS, - TAKER_SUCCESS_EVENTS}; - -use super::eth_docker_tests::{erc20_contract_checksum, fill_eth, fill_eth_erc20_with_private_key, geth_account, - swap_contract}; +pub use std::env; +use std::path::PathBuf; +use std::process::{Command, Stdio}; +use std::sync::Mutex; +pub use std::thread; +use std::time::Duration; + +use ethabi::Token; +use ethereum_types::{H160 as H160Eth, U256}; +use futures::TryFutureExt; +use futures01::Future; +use http::StatusCode; +use mm2_test_helpers::for_tests::{check_my_swap_status, check_recent_swaps, enable_eth_coin, enable_native, + enable_native_bch, erc20_dev_conf, eth_dev_conf, mm_dump, + wait_check_stats_swap_status, MarketMakerIt}; +use mm2_test_helpers::get_passphrase; +use mm2_test_helpers::structs::TransactionDetails; + use bitcrypto::{dhash160, ChecksumType}; use chain::TransactionOutput; use coins::eth::addr_from_raw_pubkey; @@ -23,32 +30,19 @@ use coins::utxo::utxo_standard::{utxo_standard_coin_with_priv_key, UtxoStandardC use coins::utxo::{coin_daemon_data_dir, sat_from_big_decimal, zcash_params_path, UtxoActivationParams, UtxoAddressFormat, UtxoCoinFields, UtxoCommonOps}; use coins::{ConfirmPaymentInput, MarketCoinOps, Transaction}; +pub use common::{block_on, now_ms, now_sec, wait_until_ms, wait_until_sec}; use crypto::privkey::key_pair_from_seed; use crypto::Secp256k1Secret; -use ethabi::Token; -use ethereum_types::{H160 as H160Eth, U256}; -use futures::TryFutureExt; -use futures01::Future; -use http::StatusCode; use keys::{Address, AddressBuilder, AddressHashEnum, AddressPrefix, KeyPair, NetworkAddressPrefixes, NetworkPrefix as CashAddrPrefix}; use mm2_core::mm_ctx::{MmArc, MmCtxBuilder}; use mm2_number::BigDecimal; -use mm2_test_helpers::get_passphrase; -use mm2_test_helpers::structs::TransactionDetails; +use mm2_rpc::data::legacy::BalanceResponse; use primitives::hash::{H160, H256}; use script::Builder; use secp256k1::Secp256k1; pub use secp256k1::{PublicKey, SecretKey}; use serde_json::{self as json, Value as Json}; -pub use std::env; -use std::path::PathBuf; -use std::process::Command; -use std::process::Stdio; -use std::str::FromStr; -use std::sync::Mutex; -pub use std::thread; -use std::time::Duration; use testcontainers::clients::Cli; use testcontainers::core::WaitFor; use testcontainers::{Container, GenericImage, RunnableImage}; @@ -57,6 +51,9 @@ use web3::types::Address as EthAddress; use web3::types::{BlockId, BlockNumber, TransactionRequest}; use web3::Web3; +use crate::docker_tests::eth_docker_tests::{erc20_contract_checksum, fill_eth, fill_eth_erc20_with_private_key, + geth_account, swap_contract}; + lazy_static! { static ref MY_COIN_LOCK: Mutex<()> = Mutex::new(()); static ref MY_COIN1_LOCK: Mutex<()> = Mutex::new(()); @@ -118,6 +115,9 @@ pub const GETH_DOCKER_IMAGE_WITH_TAG: &str = "docker.io/ethereum/client-go:stabl pub const NUCLEUS_IMAGE: &str = "docker.io/komodoofficial/nucleusd"; pub const ATOM_IMAGE: &str = "docker.io/komodoofficial/gaiad"; pub const IBC_RELAYER_IMAGE: &str = "docker.io/komodoofficial/ibc-relayer"; +pub const SOLANA_CLUSTER_DOCKER_IMAGE: &str = "docker.io/0xmmbd/solana-node-test"; + +pub const QTUM_REGTEST_DOCKER_IMAGE: &str = "docker.io/sergeyboyko/qtumregtest"; pub const QTUM_ADDRESS_LABEL: &str = "MM2_ADDRESS_LABEL"; @@ -372,6 +372,19 @@ pub fn geth_docker_node<'a>(docker: &'a Cli, ticker: &'static str, port: u16) -> } } +pub fn sol_asset_docker_node<'a>(docker: &'a Cli, ticker: &'static str) -> DockerNode<'a> { + let port = 8899; + + let image = GenericImage::new(SOLANA_CLUSTER_DOCKER_IMAGE, "latest"); + let image = RunnableImage::from((image, vec![])).with_mapped_port((port, port)); + let container = docker.run(image); + DockerNode { + container, + ticker: ticker.into(), + port, + } +} + 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()); diff --git a/mm2src/mm2_main/tests/docker_tests/qrc20_tests.rs b/mm2src/mm2_main/tests/docker_tests/qrc20_tests.rs index fbf7df14d2..4c8d7fe343 100644 --- a/mm2src/mm2_main/tests/docker_tests/qrc20_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/qrc20_tests.rs @@ -18,8 +18,9 @@ use futures01::Future; use http::StatusCode; use mm2_core::mm_ctx::{MmArc, MmCtxBuilder}; use mm2_main::mm2::lp_swap::{dex_fee_amount, max_taker_vol_from_available}; -use mm2_number::BigDecimal; +use mm2_number::{BigDecimal, MmNumber}; use mm2_rpc::data::legacy::{CoinInitResponse, OrderbookResponse}; +use mm2_test_helpers::for_tests::{mm_dump, MarketMakerIt}; use mm2_test_helpers::structs::{trade_preimage_error, RpcErrorResponse, RpcSuccessResponse, TransactionDetails}; use rand6::Rng; use serde_json::{self as json, Value as Json}; diff --git a/mm2src/mm2_main/tests/docker_tests/slp_tests.rs b/mm2src/mm2_main/tests/docker_tests/slp_tests.rs index e5ce537b7b..083be6f3c8 100644 --- a/mm2src/mm2_main/tests/docker_tests/slp_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/slp_tests.rs @@ -3,8 +3,8 @@ use crate::integration_tests_common::enable_native; use http::StatusCode; use mm2_number::BigDecimal; use mm2_rpc::data::legacy::CoinInitResponse; -use mm2_test_helpers::for_tests::{assert_coin_not_found_on_balance, disable_coin, enable_bch_with_tokens, enable_slp, - my_balance, UtxoRpcMode}; +use mm2_test_helpers::for_tests::{assert_coin_not_found_on_balance, disable_coin, enable_bch_with_tokens, + enable_native_bch, enable_slp, my_balance, MarketMakerIt, UtxoRpcMode}; use mm2_test_helpers::structs::{EnableBchWithTokensResponse, EnableSlpResponse, RpcV2Response}; use serde_json::{self as json, json, Value as Json}; use std::collections::HashSet; diff --git a/mm2src/mm2_main/tests/docker_tests/solana_tests.rs b/mm2src/mm2_main/tests/docker_tests/solana_tests.rs index d1faa5d2a7..a9188ccd92 100644 --- a/mm2src/mm2_main/tests/docker_tests/solana_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/solana_tests.rs @@ -1,10 +1,15 @@ -use crate::docker_tests::docker_tests_common::*; +use serde_json as json; + use mm2_number::bigdecimal::Zero; use mm2_test_helpers::for_tests::{disable_coin, enable_solana_with_tokens, enable_spl, sign_message, verify_message}; use mm2_test_helpers::structs::{EnableSolanaWithTokensResponse, EnableSplResponse, RpcV2Response, SignatureResponse, VerificationResponse}; -use serde_json as json; +use crate::docker_tests::docker_tests_common::*; + +const SOLANA_CLIENT_URL: &str = "http://localhost:8899"; + +#[ignore] #[test] fn test_solana_and_spl_balance_enable_spl_v2() { let mm = _solana_supplied_node(); @@ -13,7 +18,7 @@ fn test_solana_and_spl_balance_enable_spl_v2() { &mm, "SOL-DEVNET", &["USDC-SOL-DEVNET"], - "https://api.devnet.solana.com", + SOLANA_CLIENT_URL, tx_history, )); let enable_solana_with_tokens: RpcV2Response = @@ -55,7 +60,7 @@ fn test_sign_verify_message_solana() { &mm, "SOL-DEVNET", &["USDC-SOL-DEVNET"], - "https://api.devnet.solana.com", + SOLANA_CLIENT_URL, tx_history, )); @@ -88,7 +93,7 @@ fn test_sign_verify_message_spl() { &mm, "SOL-DEVNET", &["USDC-SOL-DEVNET"], - "https://api.devnet.solana.com", + SOLANA_CLIENT_URL, tx_history, )); @@ -122,7 +127,7 @@ fn test_disable_solana_platform_coin_with_tokens() { &mm, "SOL-DEVNET", &["USDC-SOL-DEVNET"], - "https://api.devnet.solana.com", + SOLANA_CLIENT_URL, false, )); block_on(enable_spl(&mm, "ADEX-SOL-DEVNET")); diff --git a/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs b/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs index 80e4470d70..bf52406dfa 100644 --- a/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs @@ -663,7 +663,7 @@ mod swap { use instant::Duration; use mm2_rpc::data::legacy::OrderbookResponse; use mm2_test_helpers::for_tests::{check_my_swap_status, check_recent_swaps, doc_conf, enable_eth_coin, - iris_ibc_nucleus_testnet_conf, nucleus_testnet_conf, + eth_dev_conf, iris_ibc_nucleus_testnet_conf, nucleus_testnet_conf, wait_check_stats_swap_status, DOC_ELECTRUM_ADDRS}; use std::convert::TryFrom; use std::str::FromStr; @@ -767,7 +767,7 @@ mod swap { U256::from(10).pow(U256::from(20)), ); - let coins = json!([nucleus_testnet_conf(), crate::eth_dev_conf()]); + let coins = json!([nucleus_testnet_conf(), eth_dev_conf()]); let mm_bob = MarketMakerIt::start( json!({ diff --git a/mm2src/mm2_main/tests/docker_tests_main.rs b/mm2src/mm2_main/tests/docker_tests_main.rs index d9c64039a0..e83f2006d2 100644 --- a/mm2src/mm2_main/tests/docker_tests_main.rs +++ b/mm2src/mm2_main/tests/docker_tests_main.rs @@ -16,10 +16,10 @@ extern crate gstuff; #[cfg(test)] #[macro_use] extern crate lazy_static; +#[cfg(test)] extern crate ser_error_derive; #[cfg(test)] #[macro_use] extern crate serde_json; -#[cfg(test)] extern crate ser_error_derive; #[cfg(test)] extern crate test; use common::custom_futures::timeout::FutureTimerExt; @@ -29,12 +29,13 @@ use std::path::PathBuf; use std::process::Command; use std::time::Duration; use test::{test_main, StaticBenchFn, StaticTestFn, TestDescAndFn}; + use testcontainers::clients::Cli; -mod docker_tests; use docker_tests::docker_tests_common::*; use docker_tests::qrc20_tests::{qtum_docker_node, QtumDockerOps, QTUM_REGTEST_DOCKER_IMAGE_WITH_TAG}; +mod docker_tests; #[allow(dead_code)] mod integration_tests_common; // AP: custom test runner is intended to initialize the required environment (e.g. coin daemons in the docker containers) @@ -54,6 +55,7 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) { const IMAGES: &[&str] = &[ UTXO_ASSET_DOCKER_IMAGE_WITH_TAG, QTUM_REGTEST_DOCKER_IMAGE_WITH_TAG, + SOLANA_CLUSTER_DOCKER_IMAGE, GETH_DOCKER_IMAGE_WITH_TAG, NUCLEUS_IMAGE, ATOM_IMAGE, @@ -75,18 +77,19 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) { let qtum_node = qtum_docker_node(&docker, 9000); let for_slp_node = utxo_asset_docker_node(&docker, "FORSLP", 10000); let geth_node = geth_docker_node(&docker, "ETH", 8545); + let sol_node = sol_asset_docker_node(&docker, "SOLCLUSTER"); let utxo_ops = UtxoAssetDockerOps::from_ticker("MYCOIN"); let utxo_ops1 = UtxoAssetDockerOps::from_ticker("MYCOIN1"); let qtum_ops = QtumDockerOps::new(); let for_slp_ops = BchDockerOps::from_ticker("FORSLP"); + utxo_ops.wait_ready(4); + utxo_ops1.wait_ready(4); qtum_ops.wait_ready(2); qtum_ops.initialize_contracts(); for_slp_ops.wait_ready(4); for_slp_ops.initialize_slp(); - utxo_ops.wait_ready(4); - utxo_ops1.wait_ready(4); wait_for_geth_node_ready(); init_geth_node(); @@ -95,6 +98,7 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) { containers.push(utxo_node); containers.push(utxo_node1); containers.push(qtum_node); + containers.push(sol_node); containers.push(for_slp_node); containers.push(geth_node); containers.push(nucleus_node); From 47861f8494b98f394b0acf9f589feb12a55f9b01 Mon Sep 17 00:00:00 2001 From: Maciek Malik Date: Fri, 26 Jul 2024 08:31:48 +0200 Subject: [PATCH 2/3] fmt changes unignore test test_solana_and_spl_balance_enable_spl_v2 --- mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs | 3 --- mm2src/mm2_main/tests/docker_tests/solana_tests.rs | 1 - 2 files changed, 4 deletions(-) diff --git a/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs b/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs index 818c2e68ea..7c3607c284 100644 --- a/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs +++ b/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs @@ -116,9 +116,6 @@ pub const NUCLEUS_IMAGE: &str = "docker.io/komodoofficial/nucleusd"; pub const ATOM_IMAGE: &str = "docker.io/komodoofficial/gaiad"; pub const IBC_RELAYER_IMAGE: &str = "docker.io/komodoofficial/ibc-relayer"; pub const SOLANA_CLUSTER_DOCKER_IMAGE: &str = "docker.io/0xmmbd/solana-node-test"; - -pub const QTUM_REGTEST_DOCKER_IMAGE: &str = "docker.io/sergeyboyko/qtumregtest"; - pub const QTUM_ADDRESS_LABEL: &str = "MM2_ADDRESS_LABEL"; /// ERC721_TEST_TOKEN has additional mint function diff --git a/mm2src/mm2_main/tests/docker_tests/solana_tests.rs b/mm2src/mm2_main/tests/docker_tests/solana_tests.rs index a9188ccd92..9508317edb 100644 --- a/mm2src/mm2_main/tests/docker_tests/solana_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/solana_tests.rs @@ -9,7 +9,6 @@ use crate::docker_tests::docker_tests_common::*; const SOLANA_CLIENT_URL: &str = "http://localhost:8899"; -#[ignore] #[test] fn test_solana_and_spl_balance_enable_spl_v2() { let mm = _solana_supplied_node(); From 4277284d9136baf25f154576b13916196a9f47ea Mon Sep 17 00:00:00 2001 From: shamardy Date: Fri, 26 Jul 2024 18:45:33 +0300 Subject: [PATCH 3/3] ignore tendermint tests for now --- .../tests/docker_tests/docker_tests_common.rs | 5 ++++ .../tests/docker_tests/tendermint_tests.rs | 17 +++++++++++++ mm2src/mm2_main/tests/docker_tests_main.rs | 24 ++++++++++--------- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs b/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs index 7c3607c284..fa47999fc1 100644 --- a/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs +++ b/mm2src/mm2_main/tests/docker_tests/docker_tests_common.rs @@ -1,6 +1,7 @@ pub use std::env; use std::path::PathBuf; use std::process::{Command, Stdio}; +use std::str::FromStr; use std::sync::Mutex; pub use std::thread; use std::time::Duration; @@ -382,6 +383,7 @@ pub fn sol_asset_docker_node<'a>(docker: &'a Cli, ticker: &'static str) -> Docke } } +#[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()); @@ -398,6 +400,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()); @@ -414,6 +417,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()); @@ -1150,6 +1154,7 @@ async fn get_current_gas_limit(web3: &Web3) { } } +#[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)"; diff --git a/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs b/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs index bf52406dfa..db0c238f5f 100644 --- a/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs +++ b/mm2src/mm2_main/tests/docker_tests/tendermint_tests.rs @@ -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(); @@ -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(); @@ -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()]); @@ -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(); @@ -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(); @@ -158,6 +163,7 @@ fn test_tendermint_hd_address() { } #[test] +#[ignore] fn test_tendermint_withdraw() { const MY_ADDRESS: &str = "cosmos150evuj4j7k9kgu38e453jdv9m3u0ft2n53flg6"; @@ -215,6 +221,7 @@ fn test_tendermint_withdraw() { } #[test] +#[ignore] fn test_tendermint_withdraw_hd() { const MY_ADDRESS: &str = "cosmos134h9tv7866jcuw708w5w76lcfx7s3x2ysyalxy"; @@ -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(); @@ -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"; @@ -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"; @@ -405,6 +415,7 @@ fn test_tendermint_ibc_withdraw_hd() { } #[test] +#[ignore] fn test_tendermint_token_withdraw() { const MY_ADDRESS: &str = "nuc150evuj4j7k9kgu38e453jdv9m3u0ft2n4fgzfr"; @@ -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."; @@ -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(); @@ -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(); @@ -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); @@ -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); @@ -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); diff --git a/mm2src/mm2_main/tests/docker_tests_main.rs b/mm2src/mm2_main/tests/docker_tests_main.rs index e83f2006d2..f1f57ab043 100644 --- a/mm2src/mm2_main/tests/docker_tests_main.rs +++ b/mm2src/mm2_main/tests/docker_tests_main.rs @@ -57,9 +57,9 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) { QTUM_REGTEST_DOCKER_IMAGE_WITH_TAG, SOLANA_CLUSTER_DOCKER_IMAGE, GETH_DOCKER_IMAGE_WITH_TAG, - NUCLEUS_IMAGE, - ATOM_IMAGE, - IBC_RELAYER_IMAGE, + // NUCLEUS_IMAGE, + // ATOM_IMAGE, + // IBC_RELAYER_IMAGE, ]; for image in IMAGES { @@ -67,11 +67,11 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) { 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); @@ -93,7 +93,7 @@ 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); @@ -101,9 +101,9 @@ pub fn docker_tests_runner(tests: &[&TestDescAndFn]) { containers.push(sol_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 @@ -176,6 +176,8 @@ fn remove_docker_containers(name: &str) { .expect("Failed to execute docker command"); } } + +#[allow(dead_code)] fn prepare_runtime_dir() -> std::io::Result { let project_root = { let mut current_dir = std::env::current_dir().unwrap();