()
| 4357 | |
| 4358 | #[test] |
| 4359 | fn policy_get_json_output_parses() { |
| 4360 | let cli = Cli::try_parse_from([ |
| 4361 | "openshell", |
| 4362 | "policy", |
| 4363 | "get", |
| 4364 | "my-sandbox", |
| 4365 | "--full", |
| 4366 | "-o", |
| 4367 | "json", |
| 4368 | ]) |
| 4369 | .expect("policy get -o json should parse"); |
| 4370 | |
| 4371 | match cli.command { |
| 4372 | Some(Commands::Policy { |
| 4373 | command: |
| 4374 | Some(PolicyCommands::Get { |
| 4375 | name, |
| 4376 | full, |
| 4377 | base, |
| 4378 | output, |
| 4379 | .. |
| 4380 | }), |
| 4381 | }) => { |
| 4382 | assert_eq!(name.as_deref(), Some("my-sandbox")); |
| 4383 | assert!(full); |
| 4384 | assert!(!base); |
| 4385 | assert!(matches!(output, PolicyGetOutput::Json)); |
| 4386 | } |
| 4387 | other => panic!("expected policy get command, got: {other:?}"), |
| 4388 | } |
| 4389 | } |
| 4390 | |
| 4391 | #[test] |
| 4392 | fn policy_get_base_output_parses() { |
nothing calls this directly
no outgoing calls
no test coverage detected