lizhimins opened a new pull request, #6330:
URL: https://github.com/apache/rocketmq-dashboard/pull/6330

   Follow-up to #5883, which made `rmqctl/scripts/package-release.sh` fail 
closed when the completion scripts are absent. The packaging test in 
`rmqctl/scripts/license-binary_test.go` still invoked the script without 
`COMPLETION_DIR`, so on a clean checkout `rmqctl/bin/completion` does not exist 
and the gate exits 1 — `make test-race` (and therefore the `rmqctl-test` CI 
job, which runs before `make build`) turns red for a reason unrelated to any 
change under test.
   
   - Supply a fixture directory holding the four scripts `make completion` 
produces (`rmqctl.bash`, `_rmqctl`, `rmqctl.fish`, `rmqctl.ps1`) and pass it as 
`COMPLETION_DIR`.
   - Assert all four reach the archive, so dropping the copy step in 
`package-release.sh` fails the test.
   - Add the missing-directory case and require the guard's own diagnostic in 
the output. The exit status alone does not pin it: with the guard removed the 
`cp` below it still fails, so packaging still exits non-zero and only the 
message distinguishes "you forgot to run `make completion`" from a cryptic `cp` 
error.
   
   Both mutations were verified red (`go test -count=1 ./scripts/...`; note the 
plain run is cached and does not notice a changed shell script), and the 
unmutated tree is green on `linux` and `windows`.
   


-- 
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