From Fedora Project Wiki

Description

Test whether the desktop correctly downloads and presents package updates for installation.


How to test

  1. Ensure that there are package updates available to install. To do this, you can open the Software app and check whether there are "System Updates" listed in the Updates view. Alternatively, run 'sudo dnf update --assumeno' and see if any packages are listed.
  2. Open a Terminal and enter the test commands (see below) in sequence.
  3. Wait a minute and run pkmon to see whether updates are being downloaded in the background.
  4. Once the download has completed:
    1. Open the updates view in the Software app.
    2. Open the system menu and select to power off the device.

Test commands

gnome-software --quit
TIMESTAMP=$(date '+%s' --date='08:00 15 days ago')
gsettings set org.gnome.software check-timestamp $TIMESTAMP
gsettings set org.gnome.software install-timestamp $TIMESTAMP
gsettings set org.gnome.software online-updates-timestamp $TIMESTAMP
gsettings set org.gnome.software update-notification-timestamp $TIMESTAMP
sudo touch --no-create --date='08:00 15 days ago' /var/lib/PackageKit/offline-update-competed
gnome-software

Expected Results

  • If the time is after 06:00, 1 minute after running gnome-software, software should download any pending updates. After this time, it should be possible to see download progress with pkmon.
  • Once updates have been downloaded:
    • A notification should be shown to say that updates are available to install.
    • The updates view in the Software app
    • The system power off confirmation dialog should include an "install pending software updates" checkbox.



Notes on Expected Behavior

  • Software updates are automatically downloaded when any of the software updates are critical, *or* when the updates are not critical and it is 2 weeks since updates were last installed
  • This test only concerns the notifications for updates which must be installed during a reboot (packages, OSTree updates, Firmware updates). Flatpak updates are expected to be automatically installed on a daily basis. The "updates installed" notifications that this generates are not covered by this test case.
  • The expected behaviour assumes that "automatic updates" are turned on (this is the default setting). If "automatic updates" are turned off, a different notification should be displayed to inform you that updates are available to download.