Skip to content

Commit f141d7f

Browse files
committed
test(docker): exercise supervisor create provisioning
Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com>
1 parent 269179b commit f141d7f

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ mod tests {
877877
use super::*;
878878
use openshell_core::policy::SandboxPolicy;
879879
use openshell_isolation::AgentSpec;
880-
use openshell_isolation::contract::BackendRegistry;
880+
use openshell_isolation::contract::{BackendRegistry, BoundaryOrigin, BoundaryProvisioning};
881881
use uuid::Uuid;
882882

883883
fn context() -> SandboxContext {
@@ -1014,15 +1014,17 @@ mod tests {
10141014
create.image = image;
10151015
create.launch_generation = Uuid::new_v4().to_string();
10161016
let envelope = create.into_boundary_plan().expect("encode create plan");
1017-
let (backend, verified) = registry
1018-
.resolve_create(envelope, BACKEND_NAME)
1019-
.expect("resolve Docker create backend");
1020-
let created = backend
1021-
.create(verified, context())
1017+
let provisioned = registry
1018+
.provision(
1019+
BoundaryProvisioning::Create(envelope),
1020+
BACKEND_NAME,
1021+
context(),
1022+
)
10221023
.await
10231024
.expect("create stopped Docker boundary");
1024-
let (descriptor, bound) = created.into_parts();
1025+
let (descriptor, origin, bound) = provisioned.into_parts();
10251026
assert_eq!(descriptor.backend_name, BACKEND_NAME);
1027+
assert_eq!(origin, BoundaryOrigin::SupervisorCreated);
10261028
let ready = bound.confirm().await.expect("confirm Docker boundary");
10271029
let running = ready.start_agent().await.expect("start Docker boundary");
10281030
let process = running.agent();

0 commit comments

Comments
 (0)