mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-03 17:45:44 +00:00
remove hostname from config
This commit is contained in:
@@ -492,7 +492,7 @@ impl NetworkConfig {
|
||||
.parse()
|
||||
.with_context(|| format!("failed to parse instance id: {:?}", self.instance_id))?,
|
||||
);
|
||||
cfg.set_hostname(self.hostname.clone());
|
||||
self.hostname.as_ref().map(|n| cfg.set_hostname(n));
|
||||
cfg.set_dhcp(self.dhcp.unwrap_or_default());
|
||||
cfg.set_inst_name(self.network_name.clone().unwrap_or_default());
|
||||
|
||||
@@ -1033,8 +1033,7 @@ mod tests {
|
||||
config.set_dhcp(rng.gen_bool(0.5));
|
||||
|
||||
if rng.gen_bool(0.7) {
|
||||
let hostname = format!("host-{}", rng.gen::<u16>());
|
||||
config.set_hostname(Some(hostname));
|
||||
config.set_hostname(&format!("host-{}", rng.gen::<u16>()));
|
||||
}
|
||||
|
||||
config.set_network_identity(crate::common::config::NetworkIdentity::new(
|
||||
|
||||
Reference in New Issue
Block a user