diff options
author | Colin Walters <walters@verbum.org> | 2018-05-03 17:29:06 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-11 12:39:17 +0000 |
commit | 6873650cae60b1c5ff57366d133b74b40803417b (patch) | |
tree | e041fc84372a4860296df96fbded07b07f0770b5 /tests/admin-test.sh | |
parent | 605d3132062e1e0b35a21578adb04a5eaae8c6d4 (diff) | |
download | ostree-6873650cae60b1c5ff57366d133b74b40803417b.tar.gz |
lib/sysroot: Add OSTREE_EX_STAGE_DEPLOYMENTS environment variable
I feel like I'm drowning in a pile of experimental-but-almost-stable
features...
Anyways, since we made the feature opt-in in rpm-ostree in
https://github.com/projectatomic/rpm-ostree/pull/1352
let's mirror that a bit here with an environment variable so people
can play with it more easily.
The tests needed some tweaks; specifically we need to reload the
status fact after making changes. I'm still a bit uncertain
about the Ansible-as-tests.
But we add an upgrade test that uses the new environment variable.
Closes: #1583
Approved by: jlebon
Diffstat (limited to 'tests/admin-test.sh')
-rw-r--r-- | tests/admin-test.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/admin-test.sh b/tests/admin-test.sh index dd87cd11..7384d8f3 100644 --- a/tests/admin-test.sh +++ b/tests/admin-test.sh @@ -21,7 +21,7 @@ set -euo pipefail -echo "1..$((24 + ${extra_admin_tests:-0}))" +echo "1..$((25 + ${extra_admin_tests:-0}))" function validate_bootloader() { cd ${test_tmpdir}; @@ -215,6 +215,11 @@ validate_bootloader echo "ok upgrade bare" os_repository_new_commit +if env OSTREE_EX_STAGE_DEPLOYMENTS=1 ${CMD_PREFIX} ostree admin upgrade --os=testos 2>err.txt; then + fatal "staged when not booted" +fi +echo "ok upgrade failed when staged" + ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos origrev=${rev} |