diff options
author | Ivan Kruglov <mail@ikruglov.com> | 2024-10-21 13:58:30 +0200 |
---|---|---|
committer | Ivan Kruglov <mail@ikruglov.com> | 2024-11-01 15:30:39 +0100 |
commit | 0c16936acc28a8e729374fe8e317960b17a92d5e (patch) | |
tree | 552fda9bd23aae8417cdd3d35ce45774ccab017e /test | |
parent | machine: use ImageUpdateParameters in io.systemd.MachineImage.Update (diff) | |
download | systemd-0c16936acc28a8e729374fe8e317960b17a92d5e.tar.xz systemd-0c16936acc28a8e729374fe8e317960b17a92d5e.zip |
machine: tests for io.systemd.MachineImage.{Clone, Remove} methods
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/TEST-13-NSPAWN.machined.sh | 9 |
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"}') |