Skip to content

Commit

Permalink
tests/storage-vm: Add check for refreshing additional snapshots
Browse files Browse the repository at this point in the history
With this change we actually test if a delta of snapshots is transferred accordingly
for both local and remote VM copies.

Signed-off-by: Julian Pelizäus <[email protected]>
  • Loading branch information
roosterfish committed Apr 11, 2024
1 parent bfffae3 commit a0025bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/storage-vm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ for poolDriver in $poolDriverList; do
lxc stop -f v2

echo "==> Checking VM can be refreshed"
lxc snapshot v1
lxc copy v1 v2 --refresh
[ "$(lxc query /1.0/instances/v2?recursion=1 | jq '.snapshots | length')" -eq "2" ]
lxc rm v1/snap1
lxc delete -f v2

echo "==> Checking running copied VM snapshot"
Expand Down Expand Up @@ -134,7 +137,10 @@ for poolDriver in $poolDriverList; do
lxc stop -f v2

echo "==> Checking VM can be refreshed remotely (same storage pool)"
lxc snapshot v1
lxc copy v1 localhost:v2 --refresh
[ "$(lxc query /1.0/instances/v2?recursion=1 | jq '.snapshots | length')" -eq "2" ]
lxc rm v1/snap1
lxc delete -f v2

echo "==> Checking running migrated VM snapshot (same storage pool)"
Expand Down Expand Up @@ -169,7 +175,10 @@ for poolDriver in $poolDriverList; do
lxc stop -f v2

echo "==> Checking VM can be refreshed remotely (different storage pool)"
lxc snapshot v1
lxc copy v1 localhost:v2 --refresh
[ "$(lxc query /1.0/instances/v2?recursion=1 | jq '.snapshots | length')" -eq "2" ]
lxc rm v1/snap1
lxc delete -f v2

echo "==> Checking running migrated VM snapshot (different storage pool)"
Expand Down

0 comments on commit a0025bc

Please sign in to comment.