diff --git a/tests/kolainst/destructive/staged-deploy.sh b/tests/kolainst/destructive/staged-deploy.sh index 0068ed5617..b17771fb74 100755 --- a/tests/kolainst/destructive/staged-deploy.sh +++ b/tests/kolainst/destructive/staged-deploy.sh @@ -29,7 +29,7 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in systemctl show -p SubState ostree-finalize-staged.path | grep -q waiting systemctl show -p ActiveState ostree-finalize-staged.service | grep -q inactive systemctl show -p TriggeredBy ostree-finalize-staged.service | grep -q path - ostree admin deploy --stage staged-deploy | tee out.txt + ostree admin deploy --stage --retain-previous-version staged-deploy | tee out.txt assert_file_has_content out.txt 'test-staged-path: Not running' systemctl show -p SubState ostree-finalize-staged.path | grep running systemctl show -p ActiveState ostree-finalize-staged.service | grep active @@ -59,6 +59,10 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in # And there should not be a staged deployment test '!' -f /run/ostree/staged-deployment + # Check that previous version was kept + ostree admin status > status.txt + test $(grep -Fce 'Version: ' status.txt) == 1 + # Upgrade with staging test '!' -f /run/ostree/staged-deployment ostree admin deploy --stage staged-deploy