Skip to content

Commit 15bce6f

Browse files
committed
fix(sandbox): bind confirmation tests to native adapter
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 387698e commit 15bce6f

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎crates/openshell-sandbox-backend/src/runtime.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,6 @@ impl BoundaryClient {
12671267
.map_err(|error| BackendError::Process(format!("encode control request: {error}")))
12681268
}
12691269

1270-
#[cfg(test)]
12711270
async fn open_exchange(
12721271
&self,
12731272
request: Request,
@@ -2712,6 +2711,7 @@ mod tests {
27122711
sandbox_id: context.sandbox_id,
27132712
mediation: Arc::new(RemoteNetworkMediation {
27142713
client: client.clone(),
2714+
adapter: SandboxRuntimeAdapter::NativeLinux,
27152715
}),
27162716
host_gateway_ip: None,
27172717
ca_file_paths: Arc::new(std::sync::Mutex::new(None)),
@@ -2727,6 +2727,7 @@ mod tests {
27272727
session_id: test_session_id(),
27282728
resource_claims: std::collections::BTreeMap::new(),
27292729
outer_fence,
2730+
adapter: SandboxRuntimeAdapter::NativeLinux,
27302731
};
27312732

27322733
assert!(matches!(

‎crates/openshell-sandbox-backend/src/runtime/tests/network_recovery.rs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ impl Fixture {
299299
.await
300300
.expect("fixture must attach and confirm");
301301
Self {
302-
source: RemoteNetworkMediation { client },
302+
source: RemoteNetworkMediation {
303+
client,
304+
adapter: SandboxRuntimeAdapter::default(),
305+
},
303306
state,
304307
server,
305308
}
@@ -378,6 +381,7 @@ async fn concurrent_tcp_accepts_recover_a_lost_tls_connection() {
378381
for _ in 0..ACCEPTS {
379382
let source = RemoteNetworkMediation {
380383
client: fixture.source.client.clone(),
384+
adapter: SandboxRuntimeAdapter::default(),
381385
};
382386
accepts.spawn(async move { verify_connection(source.accept_tcp().await.unwrap()).await });
383387
}
@@ -428,6 +432,7 @@ async fn tcp_accept_has_no_idle_operation_timeout() {
428432
let fixture = Fixture::new(Reply::Idle).await;
429433
let source = RemoteNetworkMediation {
430434
client: fixture.source.client.clone(),
435+
adapter: SandboxRuntimeAdapter::default(),
431436
};
432437
let pending = tokio::spawn(async move { source.accept_tcp().await });
433438
tokio::time::timeout(Duration::from_secs(3), fixture.state.accepting.notified())

0 commit comments

Comments
 (0)