davsclaus opened a new pull request, #27967:
URL: https://github.com/apache/camel/pull/27967

   Fifth batch of 
[CAMEL-23688](https://issues.apache.org/jira/browse/CAMEL-23688) (test coverage 
of the CLI commands): `camel overview` (21% line coverage before) and `camel 
transform route` (29%).
   
   ### Tests
   - `OverviewTest` (new): the markdown and JSON overview of a project, 
`--save`, `--ai` (a local `HttpServer` plays Ollama: its models and the answer 
of the model), an answer in another format, `--apply-descriptions` after `--ai` 
(the description lands in the route, and the summary no longer marks it as 
AI-assisted), and the errors (a directory that does not exist, a file, no 
routes, no LLM, no summary). The test without an LLM is skipped on a host that 
runs Ollama: an `--url` that does not answer falls back to the Ollama of the 
host (CAMEL-24772).
   - `TransformRouteTest` (new): Java read without compiling, YAML to Java 
(printed, and into a directory for several files), Java to an XML file, and the 
errors.
   
   ### Bugs the tests found
   - **`camel overview`** printed the markdown for a `--format` it does not 
have (`--format=yaml`); now a usage error (`2`).
   - **`camel transform route`** ran the routes and printed nothing (exit `0`) 
for a `--format` it does not have (`--format=json`); now a usage error. A route 
that cannot be read, such as invalid YAML, failed with an internal error (`70`, 
with a stack trace); now `1` with the error of the parser, which says the file, 
line and column.
   
   The user-visible changes are in the 4.24 upgrade guide.
   
   ### A question for the reviewer
   `LlmClient.detectEndpoint()` does not stop at an explicit `--url` that does 
not answer: it goes on to discover another LLM, which `OllamaDoctorSupportTest` 
documents as intended for the doctor probe (CAMEL-24772). For `camel ask`, 
`explain` and `overview --ai` without `--api-type`, that discovery includes the 
cloud providers whose keys are in the environment, so a project meant for a 
local LLM can end up at a cloud one. Not changed here.
   
   `mvn test` of camel-jbang-core: all tests pass.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01DDRLJAyf8cDXSg8iX785My
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to