From a0025bca8ea6d2a6bea9d2ff84fa7039ebbb3b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Thu, 11 Apr 2024 10:51:44 +0200 Subject: [PATCH] tests/storage-vm: Add check for refreshing additional snapshots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/storage-vm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/storage-vm b/tests/storage-vm index 64800a8d0..dcfada3b0 100755 --- a/tests/storage-vm +++ b/tests/storage-vm @@ -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" @@ -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)" @@ -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)"