davsclaus opened a new pull request, #27977: URL: https://github.com/apache/camel/pull/27977
Twelfth batch of [CAMEL-23688](https://issues.apache.org/jira/browse/CAMEL-23688) (test coverage of the CLI commands): `camel catalog kamelet` (19% line coverage before). Only its sort was tested, as the command downloads the Kamelet catalog from Maven. ### Tests - `CatalogKameletListTest` (new): the listing with a few Kamelets instead of the download (the download is now the method `loadKamelets()`, which a test replaces): the table with the first sentence of each description, `--type` in any case, `--filter` by name or description, a filter that matches nothing, JSON (and `[]`), and a catalog that cannot be downloaded (exit `1`). ### Bugs the tests found - **`--filter`** failed with a `NullPointerException` (exit `70`) when a Kamelet of the catalog has no description (the existing sort test has such a Kamelet). - **An unknown `--type`**, such as `sources`, showed nothing; now a usage error (`2`) that lists `source`, `sink` and `action`. - **A `--filter` that matched nothing** printed nothing; it says so on stderr (`No results for filter: ...`), as the other `camel catalog` commands do. The command also has `--json` now, as the other `camel catalog` commands (`[]` when nothing matches), so a script or an AI agent gets the Kamelets the same way as the components. The command docs are regenerated, and the user-visible changes are in the 4.24 upgrade guide. `mvn test` of the catalog kamelet and sort tests of camel-jbang-core: all 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]
