janhoy commented on PR #5306: URL: https://github.com/apache/solr/pull/5306#issuecomment-6879796376
🤖 *AI-assisted, reviewed by Jan* @epugh, found while porting `test_secure_example.bats` to CATS (#5323): `solr start -e <example> --host other-host` never reaches RunExampleTool. `bin/solr` forwards the option as `--solr.host.advertise <value>` (`PASS_TO_RUN_EXAMPLE`, since #3814 / SOLR-15442), but RunExampleTool declares `--host`, so picocli stops with `Unknown option: '--solr.host.advertise'` and exit 2. That hits every example, not only `secure`. For the secure example it also means the "Unsupported argument provided" check is never the one that fires; the BATS case "secure example rejects unsupported options" passes because `assert_output --partial 'host'` matches the usage text picocli prints. Reproduced on a current build of main: ``` $ bin/solr start -e techproducts --no-prompt --host other-host Unknown option: '--solr.host.advertise' usage: bin/solr run_example [-fhvy] [--user-managed] -d=DIR -e=NAME [--example-dir=DIR] [--host=HOSTNAME] ... $ echo $? 2 ``` Looks like a one-word fix in `bin/solr` plus a tighter assertion in that BATS case. Happy to file the JIRA if you want. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
