()
| 110 | |
| 111 | #[tokio::test] |
| 112 | async fn test_run_command_validation_no_input() { |
| 113 | use crate::test_utils::TestGitRepository; |
| 114 | |
| 115 | let test_repo = TestGitRepository::new().unwrap(); |
| 116 | test_repo.init_with_commit().unwrap(); |
| 117 | |
| 118 | let cmd = RunCommand { |
| 119 | task_args: TaskArgs { |
| 120 | name: Some("test".to_string()), |
| 121 | r#type: "generic".to_string(), |
| 122 | repo: Some(test_repo.path().to_string_lossy().to_string()), |
| 123 | ..Default::default() |
| 124 | }, |
| 125 | docker_client_override: mock_docker_client(), |
| 126 | }; |
| 127 | |
| 128 | let ctx = create_test_context(); |
| 129 | let result = cmd.execute(&ctx).await; |
| 130 | assert!(result.is_err()); |
| 131 | let err_msg = result.unwrap_err().to_string(); |
| 132 | assert!( |
| 133 | err_msg.contains("Either prompt or prompt file must be provided, or use edit mode"), |
| 134 | "Expected validation error, but got: {err_msg}" |
| 135 | ); |
| 136 | } |
| 137 | |
| 138 | #[tokio::test] |
| 139 | async fn test_run_command_template_without_prompt() { |
nothing calls this directly
no test coverage detected