Skip to content

Commit

Permalink
tests: Add copying of VM with snapshots
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Pelizäus <[email protected]>
  • Loading branch information
roosterfish committed Dec 7, 2023
1 parent 7b22f8e commit 1e10a89
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/storage-vm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ do
waitVMAgent v1
lxc exec v1 -- cat /root/foo.txt | grep -Fx "foo"

echo "==> Checking VM can be copied with snapshots"
lxc copy v1 v2
[ $(lxc query /1.0/instances/v2?recursion=1 | jq '.snapshots | length') -eq "1" ]

Check warning

Code scanning / shellcheck

Quote this to prevent word splitting. Warning test

Quote this to prevent word splitting.
lxc start v2
waitVMAgent v2
lxc delete -f v2

echo "==> Checking running copied VM snapshot"
lxc copy v1/snap0 v2
lxc start v2
Expand Down

0 comments on commit 1e10a89

Please sign in to comment.