()
| 4560 | |
| 4561 | #[test] |
| 4562 | fn sandbox_create_resource_flags_parse() { |
| 4563 | let cli = Cli::try_parse_from([ |
| 4564 | "openshell", |
| 4565 | "sandbox", |
| 4566 | "create", |
| 4567 | "--cpu", |
| 4568 | "500m", |
| 4569 | "--memory", |
| 4570 | "2Gi", |
| 4571 | "--", |
| 4572 | "claude", |
| 4573 | ]) |
| 4574 | .expect("sandbox create resource flags should parse"); |
| 4575 | |
| 4576 | match cli.command { |
| 4577 | Some(Commands::Sandbox { |
| 4578 | command: |
| 4579 | Some(SandboxCommands::Create { |
| 4580 | cpu, |
| 4581 | memory, |
| 4582 | command, |
| 4583 | .. |
| 4584 | }), |
| 4585 | .. |
| 4586 | }) => { |
| 4587 | assert_eq!(cpu.as_deref(), Some("500m")); |
| 4588 | assert_eq!(memory.as_deref(), Some("2Gi")); |
| 4589 | assert_eq!(command, vec!["claude".to_string()]); |
| 4590 | } |
| 4591 | other => panic!("expected SandboxCommands::Create, got: {other:?}"), |
| 4592 | } |
| 4593 | } |
| 4594 | |
| 4595 | #[test] |
| 4596 | fn sandbox_create_driver_config_json_flag_parses() { |
nothing calls this directly
no outgoing calls
no test coverage detected