-
Bug
-
Resolution: Unresolved
-
Undefined
-
6.19.0
-
1
-
False
-
Artemis Sprint 162
-
sat-artemis
-
None
-
None
-
None
-
None
-
No
Description of problem:
The test_negative_containerfile_install_command discovered a regression in stream snap 157.
When no transient package is installed on a host we expect "No transient packages found" message to be returned with non-zero return code, but we get nothing and 0.
How reproducible:
always
Is this issue a regression from an earlier version:
since snap 157
Steps to Reproduce:
1. Create a normal host (or a mock)
2. Run hammer host package containerfile-install-command --host-id <hid> on the Satellite
- or -
1. run test_negative_containerfile_install_command
Actual behavior:
[root@sat ~]# hammer host package containerfile-install-command --host-id 5
[root@sat ~]# echo $?
0
Expected behavior:
Appropriate warning message and non-zero return code when no transient package is found.
Business Impact / Additional info:
As per rh-ee-pshekar 's initial findings the API response was changed in a PR after the hammer PR got merged. It used to return message: "No transient packages found" with HTTP 404 status when no packages were found, but now it returns packageCount: 0 (without the message field) and HTTP 200 status. Since the CLI expects the message field but it's missing, and both output fields have hide_blank => true, nothing displays and it exits with code 0 instead of showing an error.