summaryrefslogtreecommitdiff
path: root/tests/test-admin-deploy-2.sh
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2015-07-14 13:30:05 -0400
committerMatthew Barnes <mbarnes@redhat.com>2015-07-16 12:49:34 -0400
commitdf0cae437556e0e2c7e6b0c10e9750520d0c34f2 (patch)
tree3796b60ea3ca2e9139234a0bad609c49be947bd7 /tests/test-admin-deploy-2.sh
parent254def3584402e5f5ee877ef4904c9a8783dd440 (diff)
downloadostree-df0cae437556e0e2c7e6b0c10e9750520d0c34f2.tar.gz
tests: Export OSTREE_SYSROOT in setup_os_repository
Eliminates the need for constantly passing --sysroot=sysroot, but also makes ostree place remote configs for sysroot/ostree/repo in sysroot/etc/ostree/remotes.d where they should have been all along.
Diffstat (limited to 'tests/test-admin-deploy-2.sh')
-rwxr-xr-xtests/test-admin-deploy-2.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test-admin-deploy-2.sh b/tests/test-admin-deploy-2.sh
index baefc6e1..db77f6f6 100755
--- a/tests/test-admin-deploy-2.sh
+++ b/tests/test-admin-deploy-2.sh
@@ -23,6 +23,7 @@ set -e
echo "1..1"
+# Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux"
echo "ok setup"
@@ -33,7 +34,7 @@ ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
export rev
# This initial deployment gets kicked off with some kernel arguments
-ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
+ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
echo "ok deploy command"
@@ -42,11 +43,11 @@ echo "ok deploy command"
bootcsum1=${bootcsum}
os_repository_new_commit
ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
-ostree admin --sysroot=sysroot upgrade --os=testos
+ostree admin upgrade --os=testos
bootcsum2=${bootcsum}
os_repository_new_commit "1"
bootcsum3=${bootcsum}
-ostree admin --sysroot=sysroot upgrade --os=testos
+ostree admin upgrade --os=testos
rev=${newrev}
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
@@ -60,7 +61,7 @@ assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-r
echo "ok deploy and GC /boot"
-ostree admin --sysroot=sysroot cleanup
+ostree admin cleanup
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'