summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIvan Kruglov <mail@ikruglov.com>2024-10-21 13:58:30 +0200
committerIvan Kruglov <mail@ikruglov.com>2024-11-01 15:30:39 +0100
commit0c16936acc28a8e729374fe8e317960b17a92d5e (patch)
tree552fda9bd23aae8417cdd3d35ce45774ccab017e /test
parentmachine: use ImageUpdateParameters in io.systemd.MachineImage.Update (diff)
downloadsystemd-0c16936acc28a8e729374fe8e317960b17a92d5e.tar.xz
systemd-0c16936acc28a8e729374fe8e317960b17a92d5e.zip
machine: tests for io.systemd.MachineImage.{Clone, Remove} methods
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/TEST-13-NSPAWN.machined.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/units/TEST-13-NSPAWN.machined.sh b/test/units/TEST-13-NSPAWN.machined.sh
index 9a6e86cefb..7d99880bed 100755
--- a/test/units/TEST-13-NSPAWN.machined.sh
+++ b/test/units/TEST-13-NSPAWN.machined.sh
@@ -381,3 +381,12 @@ varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineI
varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.Update '{"name":"long-running-renamed", "newName": "long-running", "readOnly": false}'
varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running"}'
varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running"}' | jq '.readOnly' | grep 'false'
+
+# test io.systemd.MachineImage.Clone
+varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.Clone '{"name":"long-running", "newName": "long-running-cloned", "readOnly": true}'
+varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running-cloned"}'
+varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running-cloned"}' | jq '.readOnly' | grep 'true'
+
+# test io.systemd.MachineImage.Remove
+varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.Remove '{"name":"long-running-cloned"}'
+(! varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running-cloned"}')