test(mxc): fix lifecycle and policy unit-test compile drift

- Bring futures::StreamExt into scope for the watch-stream `.next()` call in
  driver::lifecycle_tests so the negative policy proof test compiles.
- Bind a local `mapper` and drop the unused/deprecated NetworkBinary in the
  embedded-mapper network-policy rejection test.

Signed-off-by: Jamie King <jamiek@nvidia.com>
(cherry picked from commit 039b0baf98735ca672dae52be8d3af2417dc0c1a)
Signed-off-by: Jamie King <jamiek@nvidia.com>
This commit is contained in:
Jamie King
2026-08-26 22:06:17 +00:00
committed by Drew Newberry
parent 573c67d64d
commit cd92f589df
2 changed files with 4 additions and 5 deletions
@@ -662,6 +662,7 @@ fn make_sandbox_with_condition(
#[cfg(test)]
mod lifecycle_tests {
use super::*;
use futures::StreamExt;
use openshell_core::proto::compute::v1::DriverSandboxSpec;
use openshell_core::proto::{FilesystemPolicy, SandboxPolicy};
use std::time::Duration;
+3 -5
View File
@@ -325,7 +325,8 @@ mod tests {
#[test]
fn embedded_rejects_network_policy_on_isolation_session() {
use openshell_core::proto::{NetworkBinary, NetworkEndpoint, NetworkPolicyRule};
use openshell_core::proto::{NetworkEndpoint, NetworkPolicyRule};
let mapper = EmbeddedPolicyMapper;
let mut policy = fs_policy(&["C:/work/demo"], &[]);
policy.network_policies.insert(
"api".to_string(),
@@ -335,10 +336,7 @@ mod tests {
host: "example.com".into(),
..Default::default()
}],
binaries: vec![NetworkBinary {
path: "/usr/bin/curl".into(),
harness: false,
}],
binaries: Vec::new(),
},
);
let ctx = demo_ctx(Some("C:/work/demo"));