diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-15 18:57:55 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-16 11:27:10 +0200 |
commit | 0d5896a949b28d3b7743ee39a412b24d5d858178 (patch) | |
tree | 12c5bb76032a6c88990a03e09979194728b9689e /test/units/testsuite-13.nspawn.sh | |
parent | 525c3e3438a7e4cd78b42f5f6ccdc3df1e363ca9 (diff) | |
download | systemd-0d5896a949b28d3b7743ee39a412b24d5d858178.tar.gz |
test: add a couple of tests for nspawn's OCI stuff
Diffstat (limited to 'test/units/testsuite-13.nspawn.sh')
-rwxr-xr-x | test/units/testsuite-13.nspawn.sh | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/test/units/testsuite-13.nspawn.sh b/test/units/testsuite-13.nspawn.sh index 76ba143751..8f8daf05cc 100755 --- a/test/units/testsuite-13.nspawn.sh +++ b/test/units/testsuite-13.nspawn.sh @@ -46,7 +46,7 @@ mkdir -p /var/lib/machines mount -t tmpfs tmpfs /var/lib/machines testcase_sanity_check() { - local template root image oci uuid tmpdir + local template root image uuid tmpdir tmpdir="$(mktemp -d)" template="$(mktemp -d /tmp/nspawn-template.XXX)" @@ -59,24 +59,6 @@ testcase_sanity_check() { mount -o loop "$image" /mnt cp -r "$template"/* /mnt/ umount /mnt - # Create a simple OCI bundle - oci="$(mktemp -d /var/lib/machines/testsuite-13.oci-bundle.XXX)" - "$CREATE_BB_CONTAINER" "$oci/rootfs" - cat >"$oci/config.json" <<EOF -{ - "ociVersion" : "1.0.0", - "root" : { - "path" : "rootfs" - }, - "mounts" : [ - { - "destination" : "/root", - "type" : "tmpfs", - "source" : "tmpfs" - } - ] -} -EOF systemd-nspawn --help --no-pager systemd-nspawn --version @@ -101,7 +83,6 @@ EOF sh -xec 'touch /nope') test ! -e "$root/nope" systemd-nspawn --image="$image" sh -xec 'echo hello' - systemd-nspawn --oci-bundle="$oci" sh -xec 'mountpoint /root' # --volatile= touch "$root/usr/has-usr" |