sysroot: Error out on deploy --os=<unknown> which has not been initialized
We should hard require "ostree admin os-init foo" before letting deployments go there; it's too easy to typo the argument.
This commit is contained in:
1 parent
c6cc7412bf
commit
091523a3bd
2 files changed
+17
-1
No files matched your search
@@ -27,7 +27,7 @@ setup_os_repository "archive-z2" "syslinux"
|
||||
|
||||
echo "ok setup"
|
||||
|
||||
echo "1..8"
|
||||
echo "1..9"
|
||||
|
||||
ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
@@ -78,6 +78,8 @@ ostree admin --sysroot=sysroot status
|
||||
|
||||
echo "ok third deploy (swap)"
|
||||
|
||||
ostree admin --sysroot=sysroot os-init otheros
|
||||
|
||||
ostree admin --sysroot=sysroot deploy --os=otheros testos/buildmaster/x86_64-runtime
|
||||
assert_not_has_dir sysroot/boot/loader.0
|
||||
assert_has_dir sysroot/boot/loader.1
|
||||
@@ -155,3 +157,8 @@ assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${newrev}.0
|
||||
ostree admin --sysroot=sysroot status
|
||||
|
||||
echo "ok undeploy"
|
||||
|
||||
if ostree admin --sysroot=sysroot deploy --os=unknown testos:testos/buildmaster/x86_64-runtime; then
|
||||
assert_not_reached "Unexpected successful deploy of unknown OS"
|
||||
fi
|
||||
echo "ok deploy with unknown OS"
|
||||
Reference in new issue
Block a user