(name: &str, providers: Vec<String>)
| 2263 | } |
| 2264 | |
| 2265 | fn test_sandbox(name: &str, providers: Vec<String>) -> Sandbox { |
| 2266 | let mut sandbox = Sandbox { |
| 2267 | metadata: Some(ObjectMeta { |
| 2268 | id: format!("sandbox-{name}"), |
| 2269 | name: name.to_string(), |
| 2270 | created_at_ms: 1_000_000, |
| 2271 | labels: std::iter::once(("team".to_string(), "agents".to_string())).collect(), |
| 2272 | resource_version: 0, |
| 2273 | }), |
| 2274 | spec: Some(openshell_core::proto::SandboxSpec { |
| 2275 | log_level: "debug".to_string(), |
| 2276 | policy: Some(openshell_core::proto::SandboxPolicy::default()), |
| 2277 | providers, |
| 2278 | ..Default::default() |
| 2279 | }), |
| 2280 | ..Default::default() |
| 2281 | }; |
| 2282 | sandbox.set_phase(SandboxPhase::Ready as i32); |
| 2283 | sandbox.set_current_policy_version(7); |
| 2284 | sandbox |
| 2285 | } |
| 2286 | |
| 2287 | #[tokio::test] |
| 2288 | async fn attach_sandbox_provider_persists_current_provider_list() { |
no test coverage detected