mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
5c029e3f87
* Make grin.toml config optional. Mirror exisiting config parameters in grin.toml to source code, so binary can run without a config file. Add test for it. * fixup! Make grin.toml config optional
20 lines
464 B
Rust
20 lines
464 B
Rust
#[macro_use]
|
|
extern crate pretty_assertions;
|
|
extern crate grin_config as config;
|
|
|
|
use config::GlobalConfig;
|
|
|
|
#[test]
|
|
fn file_config_equal_to_defaults() {
|
|
let x = true;
|
|
let global_config_without_file = GlobalConfig::default();
|
|
|
|
let global_config_with_file = GlobalConfig::new(Some("../grin.toml")).unwrap_or_else(|e| {
|
|
panic!("Error parsing config file: {}", e);
|
|
});
|
|
|
|
assert_eq!(
|
|
global_config_without_file.members,
|
|
global_config_with_file.members
|
|
);
|
|
}
|