Skip to content

Commit

Permalink
tests/staged-deploy: test --keep-previous option
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Fonseca <[email protected]>
  • Loading branch information
r4f4 committed Apr 21, 2021
1 parent 0254bc4 commit a6a4f78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/kolainst/destructive/staged-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a6a4f78

Please sign in to comment.