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 Nov 11, 2019
1 parent 8727c51 commit ad28baf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/installed/destructive/staged-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,22 @@
environment:
commit: "{{ rpmostree_status['deployments'][0]['checksum'] }}"

- name: Previous version is retained during staged
shell: |
set -xeuo pipefail
ostree --repo=/ostree/repo rfs --create nonstaged-deploy "${commit}"
ostree admin deploy nonstaged-deploy
ostree admin status > status.txt
grep -vqFe '(staged)' status.txt
ostree admin deploy --stage --retain-previous staged-deploy
test -f /run/ostree/staged-deployment
ostree admin status > status.txt
grep -qFe '(staged)' status.txt
test $(grep -Fce 'Version: ' status.txt) == 2
ostree admin undeploy 0
ostree admin undeploy 1
environment:
commit: "{{ rpmostree_status['deployments'][0]['checksum'] }}"

- name: Cleanup refs
shell: ostree refs --delete staged-deploy nonstaged-deploy

0 comments on commit ad28baf

Please sign in to comment.