Skip to content

Commit 83fc4cb

Browse files
authored
Fix test with change on defaults (#3683)
# Description of Changes The `config` added `maincloud` in the constructors so the test need update. # Expected complexity level and risk 1 # Testing - [x] Re-run the test until pass
1 parent fa2e9b3 commit 83fc4cb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/cli/src/config.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,10 +1114,12 @@ protocol =1
11141114
let config_path = CliTomlPath::from_path_unchecked(tmp.path().join("config.toml"));
11151115

11161116
let mut local = Config::load(config_path.clone()).unwrap();
1117-
let mut testnet = Config::load(config_path.clone()).unwrap();
1117+
let mut testnet = local.clone();
1118+
let mut maincloud = local.clone();
11181119

11191120
local.home.default_server = Some("local".to_string());
11201121
testnet.home.default_server = Some("testnet".to_string());
1122+
maincloud.home.default_server = Some("maincloud".to_string());
11211123

11221124
let mut handles = vec![];
11231125
let total_threads: usize = 8;
@@ -1154,11 +1156,12 @@ protocol =1
11541156
}
11551157
let local = local.doc().to_string();
11561158
let testnet = testnet.doc().to_string();
1159+
let maincloud = maincloud.doc().to_string();
11571160

11581161
// As long the results are any valid config, we're good.
11591162
assert!(results
11601163
.iter()
1161-
.all(|r| r.trim() == local.trim() || r.trim() == testnet.trim()));
1164+
.all(|r| r.trim() == local.trim() || r.trim() == testnet.trim() || r.trim() == maincloud.trim()));
11621165
Ok(())
11631166
}
11641167
}

0 commit comments

Comments
 (0)