()
| 3804 | |
| 3805 | #[test] |
| 3806 | fn provider_profile_commands_parse() { |
| 3807 | let export = Cli::try_parse_from([ |
| 3808 | "openshell", |
| 3809 | "provider", |
| 3810 | "profile", |
| 3811 | "export", |
| 3812 | "custom-api", |
| 3813 | "-o", |
| 3814 | "yaml", |
| 3815 | ]) |
| 3816 | .expect("provider profile export should parse"); |
| 3817 | assert!(matches!( |
| 3818 | export.command, |
| 3819 | Some(Commands::Provider { |
| 3820 | command: Some(ProviderCommands::Profile(ProviderProfileCommands::Export { |
| 3821 | id, |
| 3822 | output: OutputFormat::Yaml |
| 3823 | })) |
| 3824 | }) if id == "custom-api" |
| 3825 | )); |
| 3826 | |
| 3827 | let import = Cli::try_parse_from([ |
| 3828 | "openshell", |
| 3829 | "provider", |
| 3830 | "profile", |
| 3831 | "import", |
| 3832 | "--from", |
| 3833 | "./profiles", |
| 3834 | ]) |
| 3835 | .expect("provider profile import should parse"); |
| 3836 | assert!(matches!( |
| 3837 | import.command, |
| 3838 | Some(Commands::Provider { |
| 3839 | command: Some(ProviderCommands::Profile(ProviderProfileCommands::Import { |
| 3840 | from: Some(_), |
| 3841 | .. |
| 3842 | })) |
| 3843 | }) |
| 3844 | )); |
| 3845 | |
| 3846 | let update = Cli::try_parse_from([ |
| 3847 | "openshell", |
| 3848 | "provider", |
| 3849 | "profile", |
| 3850 | "update", |
| 3851 | "custom-api", |
| 3852 | "-f", |
| 3853 | "./profiles/custom-api.yaml", |
| 3854 | ]) |
| 3855 | .expect("provider profile update should parse"); |
| 3856 | assert!(matches!( |
| 3857 | update.command, |
| 3858 | Some(Commands::Provider { |
| 3859 | command: Some(ProviderCommands::Profile(ProviderProfileCommands::Update { |
| 3860 | id, |
| 3861 | file: _ |
| 3862 | })) |
| 3863 | }) if id == "custom-api" |
nothing calls this directly
no outgoing calls
no test coverage detected