Skip to content
Snippets Groups Projects
Commit 19b738ae authored by Denis Pynkin's avatar Denis Pynkin Committed by Frédéric Dalleau
Browse files

Update manual tests for checking offline upgrade


After completion of APERTIS-5594 the offline upgrade test has been changed.
Now it is not possible to use random update bundle hence we must to
prepare the system to be upgraded to the same commit.
Added the description how to do that into all AUM manual tests.

Fixes: APERTIS-5808

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 225feee1
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,9 @@ metadata:
The automated version of this test: https://qa.apertis.org/aum-api.html"
resources:
- "A static update bundle file from https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle"
- "A static update bundle file of the same architecture, variant and version as the testing image"
- "A Fat32 USB flash drive, preloaded with the update bundle at the root of the disk"
- "Downloaded update file (with '.delta' extension) should be copied to flash drive using the name 'static-update.bundle'"
- "The DUT u-boot environment must be clean: in u-boot, run: `env default -a` followed by `saveenv`"
- "A PC must be connected to DUT serial port"
......@@ -24,6 +25,26 @@ metadata:
run:
steps:
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Check the current deployment"
- $ sudo ostree admin status
- "Start the user interface agent with mode preventing automatic system reboot after update"
......@@ -39,7 +60,7 @@ run:
- "Check if there is pending deployment and reboot the DUT"
- $ sudo ostree admin status
- $ sudo reboot
- "Check the current deployment has been updated and that the rollback entry points to the initial deployment"
- "Check the current deployment has been updated and that the rollback entry points to the prepared deployment"
- $ sudo ostree admin status
- "Start the user interface agent"
- $ sudo updatectl &
......
......@@ -12,8 +12,9 @@ metadata:
description: "Test the apertis-update-manager automatic update via mass storage device."
resources:
- "A static update bundle file from https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle"
- "A static update bundle file of the same architecture, variant and version as the testing image"
- "A Fat32 USB flash drive, preloaded with the update bundle at the root of the disk"
- "Downloaded update file (with '.delta' extension) should be copied to flash drive using the name 'static-update.bundle'"
- "The DUT u-boot environment must be clean: in u-boot, run: `env default -a` followed by `saveenv`"
- "A PC must be connected to DUT serial port"
......@@ -22,11 +23,29 @@ metadata:
run:
steps:
- "Check the current deployment"
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Plug the USB flash drive in the device"
- "The update starts automatically"
- "After the update, the device will reboot automatically"
- "Remove the USB flash drive immediatly after reboot"
- "Check the current deployment has been updated and that the rollback entry points to the initial deployment"
- "Check the current deployment has been updated and that the rollback entry points to the prepared deployment"
- $ sudo ostree admin status
......@@ -13,8 +13,9 @@ metadata:
The automated version of this test: https://qa.apertis.org/aum-out-of-space.html"
resources:
- "A static update bundle file from https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle"
- "A static update bundle file of the same architecture, variant and version as the testing image"
- "A Fat32 USB flash drive, preloaded with the update bundle at the root of the disk"
- "Downloaded update file (with '.delta' extension) should be copied to flash drive using the name 'static-update.bundle'"
- "The DUT u-boot environment must be clean: in u-boot, run: `env default -a` followed by `saveenv`"
- "A PC must be connected to DUT serial port"
......@@ -24,6 +25,26 @@ metadata:
run:
steps:
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Check the current deployment"
- $ sudo ostree admin status
- "Need to monitor the journal log"
......
......@@ -14,22 +14,42 @@ metadata:
resources:
- "A PC must be connected to DUT serial port"
- "A static update bundle file of the same architecture, variant and version as the testing image"
expected:
- "The update was properly applied"
run:
steps:
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Check the current deployment"
- $ sudo ostree admin status
- "Remove blacklist file if it exists"
- $ sudo rm -f /var/aum_blacklist.conf
- "From the host, download a static delta update and copy it to the target using scp"
- $ wget https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle
- "From the host, copy the static delta update to the target using scp"
- $ scp /path/to/static/delta user@target:update.bundle
- "The update does not start automatically, start it manually"
- $ sudo updatectl --apply-static-delta /home/user/update.bundle
- "After the update, the device will reboot automatically"
- "Check the current deployment has been updated and that the rollback entry points to the initial deployment"
- "Check the current deployment has been updated and that the rollback entry points to the prepared deployment"
- $ sudo ostree admin status
......@@ -13,8 +13,9 @@ metadata:
The automated version of this test: https://qa.apertis.org/aum-power-cut.html"
resources:
- "A static update bundle file from https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle"
- "A static update bundle file of the same architecture, variant and version as the testing image"
- "A Fat32 USB flash drive, preloaded with the update bundle at the root of the disk"
- "Downloaded update file (with '.delta' extension) should be copied to flash drive using the name 'static-update.bundle'"
- "The DUT u-boot environment must be clean: in u-boot, run: `env default -a` followed by `saveenv`"
- "A PC must be connected to DUT serial port"
......@@ -25,6 +26,26 @@ metadata:
run:
steps:
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Check the current deployment"
- $ sudo ostree admin status
- "Need to monitor the journal log to catch events in time"
......
......@@ -13,8 +13,9 @@ metadata:
The automated version of this test: https://qa.apertis.org/aum-rollback-blacklist.html"
resources:
- "A static update bundle file from https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle"
- "A static update bundle file of the same architecture, variant and version as the testing image"
- "A Fat32 USB flash drive, preloaded with the update bundle at the root of the disk"
- "Downloaded update file (with '.delta' extension) should be copied to flash drive using the name 'static-update.bundle'"
- "The DUT u-boot environment must be clean: in u-boot, run: `env default -a` followed by `saveenv`"
- "A PC must be connected to DUT serial port"
......@@ -27,6 +28,26 @@ metadata:
run:
steps:
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Check the current deployment"
- $ sudo ostree admin status
- "Start the user interface agent with mode preventing automatic system reboot after update"
......
......@@ -12,8 +12,9 @@ metadata:
description: "Test the apertis-update-manager automatic update interrupted by mass storage removing."
resources:
- "A static update bundle file from https://images.apertis.org/updater-test/armhf-minimal/static-update.bundle"
- "A static update bundle file of the same architecture, variant and version as the testing image"
- "A Fat32 USB flash drive, preloaded with the update bundle at the root of the disk"
- "Downloaded update file (with '.delta' extension) should be copied to flash drive using the name 'static-update.bundle'"
- "The DUT u-boot environment must be clean: in u-boot, run: `env default -a` followed by `saveenv`"
- "A PC must be connected to DUT serial port"
......@@ -23,6 +24,26 @@ metadata:
run:
steps:
- "Check the initial deployment"
- $ sudo ostree admin status
- "Prepare the copy of commit and deploy to allow the upgrade to the same version"
- "Command below shows you an initial commit ID, for instance"
- |
$ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
- "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file"
- |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID"
- "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Remove the initial deployment"
- $ sudo ostree admin undeploy 1
- "Reboot the system"
- "Check the current deployment"
- $ sudo ostree admin status
- "Need to monitor the journal log to catch events in time"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment