Skip to content

Commit

Permalink
test/migration: Check instance node when moving within cluster group
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
  • Loading branch information
roosterfish committed Aug 14, 2023
1 parent 555271c commit 58e3e9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/suites/clustering_move.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ test_clustering_move() {
LXD_DIR="${LXD_ONE_DIR}" lxc info c1 | grep -q "Location: node1"

# c1 can be moved within the same cluster group if it has multiple members
current_location="$(LXD_DIR="${LXD_ONE_DIR}" lxc query /1.0/instances/c1 | jq -r '.location')"
LXD_DIR="${LXD_ONE_DIR}" lxc move c1 --target=@default
LXD_DIR="${LXD_ONE_DIR}" lxc query /1.0/instances/c1 | jq -re ".location != \"$current_location\""
current_location="$(LXD_DIR="${LXD_ONE_DIR}" lxc query /1.0/instances/c1 | jq -r '.location')"
LXD_DIR="${LXD_ONE_DIR}" lxc move c1 --target=@default
LXD_DIR="${LXD_ONE_DIR}" lxc query /1.0/instances/c1 | jq -re ".location != \"$current_location\""

# c1 cannot be moved within the same cluster group if it has a single member
LXD_DIR="${LXD_ONE_DIR}" lxc move c1 --target=@foobar3
Expand Down

0 comments on commit 58e3e9b

Please sign in to comment.