Skip to content

Commit 039b0ba

Browse files
committed
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 <[email protected]>
1 parent 38e42c0 commit 039b0ba

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎crates/openshell-driver-mxc/src/driver.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ fn make_sandbox_with_condition(
661661
#[cfg(test)]
662662
mod lifecycle_tests {
663663
use super::*;
664+
use futures::StreamExt;
664665
use openshell_core::proto::compute::v1::DriverSandboxSpec;
665666
use openshell_core::proto::{FilesystemPolicy, SandboxPolicy};
666667
use std::time::Duration;

‎crates/openshell-driver-mxc/src/policy.rs‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ mod tests {
325325

326326
#[test]
327327
fn embedded_rejects_network_policy_on_isolation_session() {
328-
use openshell_core::proto::{NetworkBinary, NetworkEndpoint, NetworkPolicyRule};
328+
use openshell_core::proto::{NetworkEndpoint, NetworkPolicyRule};
329+
let mapper = EmbeddedPolicyMapper;
329330
let mut policy = fs_policy(&["C:/work/demo"], &[]);
330331
policy.network_policies.insert(
331332
"api".to_string(),
@@ -335,10 +336,7 @@ mod tests {
335336
host: "example.com".into(),
336337
..Default::default()
337338
}],
338-
binaries: vec![NetworkBinary {
339-
path: "/usr/bin/curl".into(),
340-
harness: false,
341-
}],
339+
binaries: Vec::new(),
342340
},
343341
);
344342
let ctx = demo_ctx(Some("C:/work/demo"));

0 commit comments

Comments
 (0)