summaryrefslogtreecommitdiff
path: root/tests/test-admin-deploy-karg.sh
diff options
context:
space:
mode:
authorHuijing Hei <hhei@redhat.com>2022-05-18 10:45:46 +0800
committerHuijing Hei <hhei@redhat.com>2022-05-19 22:50:09 +0800
commit0ba3bfe4fd0c11f403c08cfabd710bfa5ca2c38a (patch)
treefef6ec7aa0a5ad47d5d03fbccaea407cb8faf892 /tests/test-admin-deploy-karg.sh
parente632e5f1f1ad42403409a040a65e6845253fc376 (diff)
downloadostree-0ba3bfe4fd0c11f403c08cfabd710bfa5ca2c38a.tar.gz
Teach --karg-delete option to ostree admin deploy
See https://github.com/ostreedev/ostree/issues/2586
Diffstat (limited to 'tests/test-admin-deploy-karg.sh')
-rwxr-xr-xtests/test-admin-deploy-karg.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test-admin-deploy-karg.sh b/tests/test-admin-deploy-karg.sh
index 8667231b..047ca63b 100755
--- a/tests/test-admin-deploy-karg.sh
+++ b/tests/test-admin-deploy-karg.sh
@@ -24,7 +24,7 @@ set -euo pipefail
# Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive" "syslinux"
-echo "1..3"
+echo "1..4"
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
@@ -69,3 +69,13 @@ ${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --k
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND .*FOO=TESTORDERED .*APPENDARG=3RDAPPEND'
echo "ok deploy --karg-append"
+
+assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*quiet .*TESTARG=TESTVALUE .*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND'
+${CMD_PREFIX} ostree admin deploy --os=testos --karg-delete=TESTARG=TESTVALUE testos:testos/buildmain/x86_64-runtime
+assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE'
+${CMD_PREFIX} ostree admin deploy --os=testos --karg-delete=quiet testos:testos/buildmain/x86_64-runtime
+assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*quiet'
+${CMD_PREFIX} ostree admin deploy --os=testos --karg-delete=APPENDARG=VALAPPEND testos:testos/buildmain/x86_64-runtime
+assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND'
+
+echo "ok deploy --karg-delete"