Skip to content

Commit

Permalink
test: Rename storage volumes in a cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Pelizäus <[email protected]>
  • Loading branch information
roosterfish committed Oct 18, 2023
1 parent 72e2084 commit 3a2ee32
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/suites/clustering.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a2ee32

Please sign in to comment.