Skip to content

Commit 7d8800e

Browse files
committed
primitives - config - make DEVELOPMENT_CONFIG private again & use fn configuration() instead
1 parent ee95a1e commit 7d8800e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

primitives/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::fs;
55
use toml;
66

77
lazy_static! {
8-
pub static ref DEVELOPMENT_CONFIG: Config =
8+
static ref DEVELOPMENT_CONFIG: Config =
99
toml::from_str(include_str!("../../docs/config/dev.toml"))
1010
.expect("Failed to parse dev.toml config file");
1111
static ref PRODUCTION_CONFIG: Config =

validator_worker/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ mod test {
5151

5252
use adapter::DummyAdapter;
5353
use primitives::adapter::AdapterOptions;
54+
use primitives::config::configuration;
5455
use primitives::util::tests::prep_db::{DUMMY_CHANNEL, IDS};
55-
use primitives::{config::DEVELOPMENT_CONFIG, BalancesMap, Channel};
56+
use primitives::{BalancesMap, Channel};
5657

5758
fn setup_iface(channel: &Channel) -> SentryApi<DummyAdapter> {
5859
let adapter_options = AdapterOptions {
@@ -62,7 +63,7 @@ mod test {
6263
keystore_file: None,
6364
keystore_pwd: None,
6465
};
65-
let config = DEVELOPMENT_CONFIG.clone();
66+
let config = configuration("development", None).expect("Dev config should be available");
6667
let dummy_adapter = DummyAdapter::init(adapter_options, &config);
6768

6869
SentryApi::new(dummy_adapter, &channel, &config, false).expect("should succeed")

0 commit comments

Comments
 (0)