wip: bootstrap step of okd installation required some refactoring, its getting there
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
This commit is contained in:
@@ -226,6 +226,7 @@ mod tests {
|
||||
"src/tests/data/config-full-ncd0.xml",
|
||||
"src/tests/data/config-full-25.7.xml",
|
||||
"src/tests/data/config-full-25.7-dummy-dnsmasq-options.xml",
|
||||
"src/tests/data/config-25.7-dnsmasq-static-host.xml",
|
||||
] {
|
||||
let mut test_file_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
test_file_path.push(path);
|
||||
|
||||
@@ -442,7 +442,11 @@ mod test {
|
||||
|
||||
// This IP belongs to host-a, but the hostname belongs to host-b.
|
||||
dhcp_config
|
||||
.add_static_mapping("CC:CC:CC:CC:CC:CC", Ipv4Addr::new(192, 168, 1, 10), "host-b")
|
||||
.add_static_mapping(
|
||||
"CC:CC:CC:CC:CC:CC",
|
||||
Ipv4Addr::new(192, 168, 1, 10),
|
||||
"host-b",
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
@@ -457,7 +461,11 @@ mod test {
|
||||
|
||||
// This IP is ambiguous.
|
||||
dhcp_config
|
||||
.add_static_mapping("CC:CC:CC:CC:CC:CC", Ipv4Addr::new(192, 168, 1, 30), "new-host")
|
||||
.add_static_mapping(
|
||||
"CC:CC:CC:CC:CC:CC",
|
||||
Ipv4Addr::new(192, 168, 1, 30),
|
||||
"new-host",
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
@@ -509,8 +517,18 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_remove_mac_from_correct_host_only() {
|
||||
let host1 = create_host("uuid-1", "host-1", "192.168.1.50", "AA:AA:AA:AA:AA:AA,BB:BB:BB:BB:BB:BB");
|
||||
let host2 = create_host("uuid-2", "host-2", "192.168.1.51", "CC:CC:CC:CC:CC:CC,DD:DD:DD:DD:DD:DD");
|
||||
let host1 = create_host(
|
||||
"uuid-1",
|
||||
"host-1",
|
||||
"192.168.1.50",
|
||||
"AA:AA:AA:AA:AA:AA,BB:BB:BB:BB:BB:BB",
|
||||
);
|
||||
let host2 = create_host(
|
||||
"uuid-2",
|
||||
"host-2",
|
||||
"192.168.1.51",
|
||||
"CC:CC:CC:CC:CC:CC,DD:DD:DD:DD:DD:DD",
|
||||
);
|
||||
let mut dhcp_config = setup_test_env(vec![host1.clone(), host2.clone()]);
|
||||
|
||||
dhcp_config.remove_static_mapping("AA:AA:AA:AA:AA:AA");
|
||||
|
||||
Reference in New Issue
Block a user