diff options
-rw-r--r-- | cmd/podman/auto-update.go | 4 | ||||
-rw-r--r-- | test/system/255-auto-update.bats | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/auto-update.go b/cmd/podman/auto-update.go index 99226790f..34cc7d74b 100644 --- a/cmd/podman/auto-update.go +++ b/cmd/podman/auto-update.go @@ -50,7 +50,9 @@ func autoUpdate(cmd *cobra.Command, args []string) error { return errors.Errorf("`%s` takes no arguments", cmd.CommandPath()) } report, failures := registry.ContainerEngine().AutoUpdate(registry.GetContext(), autoUpdateOptions) - if report != nil { + if report != nil && len(report.Units) > 0 { + // Make it more obvious to users what the output means. + fmt.Println("\nRestarted the following systemd units:") for _, unit := range report.Units { fmt.Println(unit) } diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index 3713243d5..cce8973fc 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -123,6 +123,8 @@ function _confirm_update() { _wait_service_ready container-$cname.service run_podman auto-update is "$output" "Trying to pull.*" "Image is updated." + is "$output" ".*Restarted the following systemd units: +container-$cname.service" "Systemd unit has been restarted" _confirm_update $cname $ori_image } |