Skip to content

Commit c63a604

Browse files
committed
test(docker): assert networkless host aliases
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 8780abe commit c63a604

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • crates/openshell-driver-docker/src

‎crates/openshell-driver-docker/src/tests.rs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,14 @@ fn build_container_create_body_replaces_inherited_cmd_with_boundary_mode() {
21012101
Some(&vec!["apparmor=unconfined".to_string()])
21022102
);
21032103
assert_eq!(host_config.network_mode.as_deref(), Some("none"));
2104-
assert!(host_config.extra_hosts.is_none());
2104+
assert_eq!(
2105+
host_config.extra_hosts,
2106+
Some(vec![
2107+
"host.openshell.internal:host-gateway".to_string(),
2108+
"host.docker.internal:host-gateway".to_string(),
2109+
]),
2110+
"networkless workloads still receive stable host aliases"
2111+
);
21052112
assert!(create_body.networking_config.is_none());
21062113
}
21072114

0 commit comments

Comments
 (0)