Account for default config changes in config tests.

This commit is contained in:
Sergio Benitez 2018-01-20 11:36:06 -08:00
parent 2d7b4b4233
commit 5a9d857329
1 changed files with 4 additions and 2 deletions

View File

@ -543,9 +543,11 @@ mod test {
// Take the lock so changing the environment doesn't cause races.
let _env_lock = ENV_LOCK.lock().unwrap();
// First, without an environment. Should get development defaults.
// First, without an environment. Should get development defaults on
// debug builds and productions defaults on non-debug builds.
env::remove_var(CONFIG_ENV);
check_config!(active_default(), default_config(Development));
#[cfg(debug_assertions)] check_config!(active_default(), default_config(Development));
#[cfg(not(debug_assertions))] check_config!(active_default(), default_config(Production));
// Now with an explicit dev environment.
for env in &["development", "dev"] {