From 3a2ee3284e82a9a3c0098125e5d1c5d71b1b005d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 18 Oct 2023 12:28:37 +0200 Subject: [PATCH] test: Rename storage volumes in a cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- test/suites/clustering.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/suites/clustering.sh b/test/suites/clustering.sh index d5be7c02cfcc..a8c39ab815d1 100644 --- a/test/suites/clustering.sh +++ b/test/suites/clustering.sh @@ -663,9 +663,19 @@ test_clustering_storage() { LXD_DIR="${LXD_ONE_DIR}" lxc storage volume copy pool1/vol1 pool1/vol1 --target=node1 --destination-target=node2 LXD_DIR="${LXD_ONE_DIR}" lxc storage volume copy pool1/vol1 pool1/vol1 --target=node1 --destination-target=node2 --refresh + # Check renaming storage volume works. + LXD_DIR="${LXD_ONE_DIR}" lxc storage volume create pool1 vol2 --target=node1 + LXD_DIR="${LXD_ONE_DIR}" lxc storage volume move pool1/vol2 pool1/vol3 --target=node1 + LXD_DIR="${LXD_TWO_DIR}" lxc storage volume show pool1 vol3 | grep -q node1 + LXD_DIR="${LXD_ONE_DIR}" lxc storage volume move pool1/vol3 pool1/vol2 --target=node1 --destination-target=node2 + LXD_DIR="${LXD_TWO_DIR}" lxc storage volume show pool1 vol2 | grep -q node2 + LXD_DIR="${LXD_ONE_DIR}" lxc storage volume rename pool1 vol2 vol3 --target=node2 + LXD_DIR="${LXD_TWO_DIR}" lxc storage volume show pool1 vol3 | grep -q node2 + # Delete pool and check cleaned up. LXD_DIR="${LXD_ONE_DIR}" lxc storage volume delete pool1 vol1 --target=node1 LXD_DIR="${LXD_ONE_DIR}" lxc storage volume delete pool1 vol1 --target=node2 + LXD_DIR="${LXD_ONE_DIR}" lxc storage volume delete pool1 vol3 --target=node2 LXD_DIR="${LXD_TWO_DIR}" lxc storage delete pool1 ! stat "${LXD_ONE_SOURCE}/containers" || false ! stat "${LXD_TWO_SOURCE}/containers" || false