davsclaus opened a new pull request, #28799: URL: https://github.com/apache/camel/pull/28799
[CAMEL-23810](https://issues.apache.org/jira/browse/CAMEL-23810): a step before the port of the CLI from picocli to aesh. Only a test is added. `CliParseGoldenTest` (#28791) guards what the CLI *parses*. Nothing guarded what it *prints*: the help, and the error for a wrong command line. Both come from picocli today, and will come from aesh after the switch. **What:** `CliHelpGoldenTest` writes `src/test/resources/golden/cli-help.txt` (6000 lines) and compares against it: - the `--help` of `camel` and of each of the 143 commands, without colors, at the 80 columns the CLI uses; - for 9 wrong command lines, the exit code, stderr and stdout: - an unknown command, with the "did you mean" hint; - an unknown option; - an option without its value; - an invalid value, with and without `--json`; - `--json` with an unknown option; - a config key, an integration and a file that are not there. The directories of the machine are written as `${cwd}` and `${user.home}`. The versions that the build sets are written as `${camel-version}`, `${spring-boot-version}` and `${hawtio-version}`. So the file is the same on every machine and after an upgrade. Like the parse golden test, it is skipped when `FORCE_COLOR` turns on the colors of the logging, because that changes a default value shown in the help. A difference lists the sections that changed, each with the expected and the actual text. Run with `-Dcamel.golden.update=true` to write the file again, and check the diff. **Checked:** the test passes against the file it wrote, and fails with that section when one line of the file is changed. The help of `camel` lists the exit codes, so #28798 (exit code `66`) changes one line of this file. Whichever of the two PRs merges second regenerates it. _Claude Code on behalf of davsclaus (Claus Ibsen)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0128ThHB3iQdrvSRLVBGRrdP -- 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]
