aboutsummaryrefslogtreecommitdiff
path: root/src/config/options_test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/options_test.rs')
-rw-r--r--src/config/options_test.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/config/options_test.rs b/src/config/options_test.rs
index 8e05c90..073b9ac 100644
--- a/src/config/options_test.rs
+++ b/src/config/options_test.rs
@@ -63,15 +63,13 @@ fn ok_from_iter_minimal_valid_options() {
rt_config.firewall.refresh_time,
Duration::from_secs(REFRESH_TIME.into())
);
- assert!(rt_config.igd.private_ip.is_none());
+ let igd = rt_config.igd.unwrap();
+ assert!(igd.private_ip.is_none());
assert_eq!(
- rt_config.igd.expiration_time,
+ igd.expiration_time,
Duration::from_secs(EXPIRATION_TIME.into())
);
- assert_eq!(
- rt_config.igd.refresh_time,
- Duration::from_secs(REFRESH_TIME.into())
- );
+ assert_eq!(igd.refresh_time, Duration::from_secs(REFRESH_TIME.into()));
}
#[test]
@@ -117,10 +115,11 @@ fn ok_from_iter_all_valid_options() {
opts.get(&"DIPLONAT_CONSUL_URL".to_string()).unwrap()
);
assert_eq!(rt_config.firewall.refresh_time, refresh_time);
+ let igd = rt_config.igd.unwrap();
assert_eq!(
- &rt_config.igd.private_ip.unwrap().to_string(),
+ &igd.private_ip.unwrap().to_string(),
opts.get(&"DIPLONAT_PRIVATE_IP".to_string()).unwrap()
);
- assert_eq!(rt_config.igd.expiration_time, expiration_time);
- assert_eq!(rt_config.igd.refresh_time, refresh_time);
+ assert_eq!(igd.expiration_time, expiration_time);
+ assert_eq!(igd.refresh_time, refresh_time);
}