app/status: Use AutomaticUpdatesDriver
if updates driven by external driver
When automatic updates are driven by an external driver like Zincati, display e.g. `AutomaticUpdatesDriver: Zincati` instead of `AutomaticUpdates: driven by Zincati`, since the latter might suggest it is rpm-ostree's own built-in support for automatic updates.
This commit is contained in:
parent
1e79e5abde
commit
4dd80a8b9c
@ -375,10 +375,10 @@ print_daemon_state (RPMOSTreeSysroot *sysroot_proxy,
|
||||
if (update_driver_name && update_driver_sd_unit)
|
||||
{
|
||||
if (opt_verbose)
|
||||
g_print ("AutomaticUpdates: driven by %s (%s)\n",
|
||||
g_print ("AutomaticUpdatesDriver: %s (%s)\n",
|
||||
update_driver_name, update_driver_sd_unit);
|
||||
else
|
||||
g_print ("AutomaticUpdates: driven by %s\n", update_driver_name);
|
||||
g_print ("AutomaticUpdatesDriver: %s\n", update_driver_name);
|
||||
|
||||
/* only try to get unit's StatusText if we're on the system bus */
|
||||
if (bus_type == G_BUS_TYPE_SYSTEM)
|
||||
|
@ -61,9 +61,9 @@ assert_file_has_content agent.txt testing-agent-id
|
||||
vm_cmd journalctl --after-cursor "'$cursor'" -u rpm-ostreed -o json | jq -r '.AGENT_SD_UNIT//""' > agent_sd_unit.txt
|
||||
assert_file_has_content agent_sd_unit.txt sshd.service
|
||||
vm_cmd rpm-ostree status > status.txt
|
||||
assert_file_has_content status.txt 'driven by TestDriver'
|
||||
assert_file_has_content status.txt 'AutomaticUpdatesDriver: TestDriver'
|
||||
vm_cmd rpm-ostree status -v > verbose_status.txt
|
||||
assert_file_has_content verbose_status.txt 'driven by TestDriver (sshd.service)'
|
||||
assert_file_has_content verbose_status.txt 'AutomaticUpdatesDriver: TestDriver (sshd.service)'
|
||||
assert_file_has_content verbose_status.txt ' DriverState: active'
|
||||
vm_assert_status_jq ".\"update-driver\"[\"driver-name\"] == \"TestDriver\"" \
|
||||
".\"update-driver\"[\"driver-sd-unit\"] == \"sshd.service\""
|
||||
@ -77,9 +77,9 @@ vm_cmd rpm-ostree deploy \'\' \
|
||||
--register-driver=OtherTestDriver
|
||||
vm_cmd test -f /run/rpm-ostree/update-driver.gv
|
||||
vm_cmd rpm-ostree status > status.txt
|
||||
assert_file_has_content status.txt 'driven by OtherTestDriver'
|
||||
assert_file_has_content status.txt 'AutomaticUpdatesDriver: OtherTestDriver'
|
||||
vm_cmd rpm-ostree status -v > verbose_status.txt
|
||||
assert_file_has_content verbose_status.txt 'driven by OtherTestDriver (sshd.service)'
|
||||
assert_file_has_content verbose_status.txt 'AutomaticUpdatesDriver: OtherTestDriver (sshd.service)'
|
||||
vm_assert_status_jq ".\"update-driver\"[\"driver-name\"] == \"OtherTestDriver\"" \
|
||||
".\"update-driver\"[\"driver-sd-unit\"] == \"sshd.service\""
|
||||
echo "ok deploy --register-driver with empty string revision"
|
||||
|
Loading…
Reference in New Issue
Block a user