(
id: &str,
name: &str,
policy: ProtoSandboxPolicy,
providers: Vec<String>,
)
| 4385 | } |
| 4386 | |
| 4387 | fn test_sandbox( |
| 4388 | id: &str, |
| 4389 | name: &str, |
| 4390 | policy: ProtoSandboxPolicy, |
| 4391 | providers: Vec<String>, |
| 4392 | ) -> Sandbox { |
| 4393 | use openshell_core::proto::{SandboxPhase, SandboxSpec}; |
| 4394 | |
| 4395 | let mut sandbox = Sandbox { |
| 4396 | metadata: Some(openshell_core::proto::datamodel::v1::ObjectMeta { |
| 4397 | id: id.to_string(), |
| 4398 | name: name.to_string(), |
| 4399 | created_at_ms: 1_000_000, |
| 4400 | labels: HashMap::new(), |
| 4401 | resource_version: 0, |
| 4402 | }), |
| 4403 | spec: Some(SandboxSpec { |
| 4404 | policy: Some(policy), |
| 4405 | providers, |
| 4406 | ..Default::default() |
| 4407 | }), |
| 4408 | ..Default::default() |
| 4409 | }; |
| 4410 | sandbox.set_phase(SandboxPhase::Ready as i32); |
| 4411 | sandbox |
| 4412 | } |
| 4413 | |
| 4414 | async fn enable_providers_v2(state: &Arc<ServerState>) { |
| 4415 | let global_settings = StoredSettings { |
no test coverage detected