(
&self,
request: Request<CreateSandboxRequest>,
)
| 245 | } |
| 246 | |
| 247 | async fn create_sandbox( |
| 248 | &self, |
| 249 | request: Request<CreateSandboxRequest>, |
| 250 | ) -> Result<Response<CreateSandboxResponse>, Status> { |
| 251 | let sandbox = request.into_inner().sandbox; |
| 252 | self.with_state(|state| { |
| 253 | if let Some(sandbox) = sandbox.as_ref() { |
| 254 | state.sandboxes.insert(sandbox.id.clone(), sandbox.clone()); |
| 255 | } |
| 256 | state |
| 257 | .calls |
| 258 | .push(FakeComputeDriverCall::CreateSandbox { sandbox }); |
| 259 | }); |
| 260 | Ok(Response::new(CreateSandboxResponse {})) |
| 261 | } |
| 262 | |
| 263 | async fn stop_sandbox( |
| 264 | &self, |
nothing calls this directly
no test coverage detected