Skip to content
Permalink
Browse files

Use more electrum servers in some tests for redundancy.

  • Loading branch information...
artemii235 committed Jun 24, 2019
1 parent 80697b4 commit d5da49ea065eb656ebce9486e7f274abd2c96a6e
Showing with 12 additions and 12 deletions.
  1. +4 −4 mm2src/mm2_tests.rs
  2. +8 −8 mm2src/portfolio/portfolio_tests.rs
@@ -525,7 +525,7 @@ fn test_rpc_password_from_json() {
"userpass": "password1",
"method": "electrum",
"coin": "BEER",
"servers": [{"url":"electrum2.cipig.net:10022"}],
"servers": [{"url":"electrum1.cipig.net:10022"},{"url":"electrum2.cipig.net:10022"},{"url":"electrum3.cipig.net:10022"}],
"mm2": 1,
})));

@@ -536,7 +536,7 @@ fn test_rpc_password_from_json() {
"userpass": mm.userpass,
"method": "electrum",
"coin": "BEER",
"servers": [{"url":"electrum2.cipig.net:10022"}],
"servers": [{"url":"electrum1.cipig.net:10022"},{"url":"electrum2.cipig.net:10022"},{"url":"electrum3.cipig.net:10022"}],
"mm2": 1,
})));

@@ -547,7 +547,7 @@ fn test_rpc_password_from_json() {
"userpass": mm.userpass,
"method": "electrum",
"coin": "PIZZA",
"servers": [{"url":"electrum2.cipig.net:10024"}],
"servers": [{"url":"electrum1.cipig.net:10024"},{"url":"electrum2.cipig.net:10024"},{"url":"electrum3.cipig.net:10024"}],
"mm2": 1,
})));

@@ -1264,7 +1264,7 @@ fn test_order_errors_when_base_equal_rel() {
let (_dump_log, _dump_dashboard) = mm_dump (&mm.log_path);
log!({"Log path: {}", mm.log_path.display()});
unwrap! (mm.wait_for_log (22., &|log| log.contains (">>>>>>>>> DEX stats ")));
enable_electrum (&mm, "BEER", vec!["electrum2.cipig.net:10022"]);
enable_electrum (&mm, "BEER", vec!["electrum1.cipig.net:10022","electrum2.cipig.net:10022","electrum3.cipig.net:10022"]);

let rc = unwrap! (mm.rpc (json! ({
"userpass": mm.userpass,
@@ -17,8 +17,8 @@ pub fn test_autoprice_coingecko (local_start: LocalStart) {
let (passphrase, mut mm, _dump_log, _dump_dashboard) = mm_spat (local_start, &identity);
unwrap! (mm.wait_for_log (19., &mut |log| log.contains (">>>>>>>>> DEX stats ")));

enable_electrum (&mm, "KMD", vec!["electrum1.cipig.net:10001"]);
enable_electrum (&mm, "BTC", vec!["electrum1.cipig.net:10000"]);
enable_electrum (&mm, "KMD", vec!["electrum1.cipig.net:10001","electrum2.cipig.net:10001","electrum3.cipig.net:10001"]);
enable_electrum (&mm, "BTC", vec!["electrum1.cipig.net:10000","electrum2.cipig.net:10000","electrum3.cipig.net:10000"]);

let autoprice = unwrap! (mm.rpc (json! ({
"userpass": mm.userpass,
@@ -34,8 +34,8 @@ pub fn test_autoprice_coingecko (local_start: LocalStart) {
})));
assert! (autoprice.0.is_server_error(), "autoprice should finish with error if BTC and KMD are not enabled, bot got: {:?}", autoprice);

enable_electrum (&mm, "BEER", vec!["electrum2.cipig.net:10022"]);
enable_electrum (&mm, "PIZZA", vec!["electrum1.cipig.net:10024"]);
enable_electrum (&mm, "BEER", vec!["electrum1.cipig.net:10022","electrum2.cipig.net:10022","electrum3.cipig.net:10022"]);
enable_electrum (&mm, "PIZZA", vec!["electrum1.cipig.net:10024","electrum2.cipig.net:10024","electrum3.cipig.net:10024"]);

// Looks like we don't need enabling the coin to base the price on it.
// let electrum_dash = unwrap! (mm.rpc (json! ({
@@ -108,8 +108,8 @@ pub fn test_autoprice_coinmarketcap (local_start: LocalStart) {
});
unwrap! (mm.wait_for_log (19., &mut |log| log.contains (">>>>>>>>> DEX stats ")));

enable_electrum (&mm, "BEER", vec!["electrum2.cipig.net:10022"]);
enable_electrum (&mm, "PIZZA", vec!["electrum1.cipig.net:10024"]);
enable_electrum (&mm, "BEER", vec!["electrum1.cipig.net:10022","electrum2.cipig.net:10022","electrum3.cipig.net:10022"]);
enable_electrum (&mm, "PIZZA", vec!["electrum1.cipig.net:10024","electrum2.cipig.net:10024","electrum3.cipig.net:10024"]);

let autoprice = unwrap! (mm.rpc (json! ({
"userpass": mm.userpass,
@@ -125,8 +125,8 @@ pub fn test_autoprice_coinmarketcap (local_start: LocalStart) {
})));
assert! (autoprice.0.is_server_error(), "autoprice should finish with error if BTC and KMD are not enabled, bot got: {:?}", autoprice);

enable_electrum (&mm, "KMD", vec!["electrum1.cipig.net:10001"]);
enable_electrum (&mm, "BTC", vec!["electrum1.cipig.net:10000"]);
enable_electrum (&mm, "KMD", vec!["electrum1.cipig.net:10001","electrum2.cipig.net:10001","electrum3.cipig.net:10001"]);
enable_electrum (&mm, "BTC", vec!["electrum1.cipig.net:10000","electrum2.cipig.net:10000","electrum3.cipig.net:10000"]);
let address = unwrap! (mm.rpc (json! ({
"userpass": mm.userpass,
"method": "calcaddress",

0 comments on commit d5da49e

Please sign in to comment.
You can’t perform that action at this time.