Skip to content

Commit

Permalink
updater: update tests and manual
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Jun 29, 2024
1 parent 0fe36e5 commit ef06321
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion doc/tools/qubes-vm-update.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Auxiliary
Maximum number of VMs configured simultaneously (default: number of cpus)
--log LOG
Provide logging level. Values: DEBUG, INFO (default), WARNING, ERROR, CRITICAL
--signal-no-updates
Return exit code 100 instead of 0 if there is no updates available.

--no-progress
Do not show upgrading progress
Expand Down Expand Up @@ -88,7 +90,7 @@ RETURN CODES

0: ok

100: ok, no updates available
100: ok, returned if `--signal-no-updates` and no updates available

1: general error

Expand Down
5 changes: 3 additions & 2 deletions vmupdate/tests/test_vmupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,9 @@ def test_return_codes(

monkeypatch.setattr(vmupdate, "get_targets", lambda *_: [vm, appvm])

retcode = main((
"--just-print-progress", "--all", "--force-update"), test_qapp)
retcode = main(
("--just-print-progress", "--all", "--force-update",
"--signal-no-updates"), test_qapp)
assert retcode == expected_retcode


Expand Down
2 changes: 1 addition & 1 deletion vmupdate/vmupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def parse_args(args, app):
help='Just print what happens.')
parser.add_argument(
'--signal-no-updates', action='store_true',
help='Return exit code 100 instread of 0 '
help='Return exit code 100 instead of 0 '
'if there is no updates available.')

restart = parser.add_mutually_exclusive_group()
Expand Down

0 comments on commit ef06321

Please sign in to comment.