test: drop windows_backup_filters_loopback
The test inlined the 3-line filter block from install_windows rather than calling a production helper, so it was testing stdlib Vec::retain + is_loopback_or_stub — both already covered elsewhere. Deleting it removes a test that would silently pass even if install_windows stopped filtering altogether. The predicate logic for macOS-shaped backups stays covered by macos_backup_real_upstream_detection (same inner Vec<String> type). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1582,34 +1582,6 @@ Wireless LAN adapter Wi-Fi:
|
|||||||
assert!(!resolv_conf_is_numa_managed(mixed));
|
assert!(!resolv_conf_is_numa_managed(mixed));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn windows_backup_filters_loopback() {
|
|
||||||
use std::collections::HashMap;
|
|
||||||
let mut interfaces: HashMap<String, WindowsInterfaceDns> = HashMap::new();
|
|
||||||
interfaces.insert(
|
|
||||||
"Wi-Fi".into(),
|
|
||||||
WindowsInterfaceDns {
|
|
||||||
dhcp: false,
|
|
||||||
servers: vec!["127.0.0.1".into(), "1.1.1.1".into()],
|
|
||||||
},
|
|
||||||
);
|
|
||||||
interfaces.insert(
|
|
||||||
"Ethernet".into(),
|
|
||||||
WindowsInterfaceDns {
|
|
||||||
dhcp: true,
|
|
||||||
servers: vec!["127.0.0.1".into()],
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
// Mimic the filter step from install_windows
|
|
||||||
for iface in interfaces.values_mut() {
|
|
||||||
iface.servers.retain(|s| !is_loopback_or_stub(s));
|
|
||||||
}
|
|
||||||
|
|
||||||
assert_eq!(interfaces["Wi-Fi"].servers, vec!["1.1.1.1".to_string()]);
|
|
||||||
assert!(interfaces["Ethernet"].servers.is_empty());
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_ipconfig_skips_disconnected() {
|
fn parse_ipconfig_skips_disconnected() {
|
||||||
let sample = "\
|
let sample = "\
|
||||||
|
|||||||
Reference in New Issue
Block a user