Skip to content

Commit

Permalink
tests/storage-disks-vm: do cold unplugging on older LXD versions
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
  • Loading branch information
simondeziel committed Jun 25, 2024
1 parent befec11 commit 18d6002
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/storage-disks-vm
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,15 @@ sleep 1
! lxc exec v2 -- mountpoint /mnt/bar1 || false # Just tests for mountpoint disconnected, not unmount.
lxc config device add v2 "${LONG_DEVICE_NAME}" disk source="${testRoot}/allowed1" path="/mnt/bar2" # Test hotplugging as well
lxc exec v2 -- mountpoint /mnt/bar2
lxc config device remove v2 "${LONG_DEVICE_NAME}"
sleep 1
if [ "${LONG_DEVICE_NAME}" = "notSoLongname" ]; then
lxc stop -f v2
lxc config device remove v2 "${LONG_DEVICE_NAME}"
lxc start v2
waitInstanceReady v2
else
lxc config device remove v2 "${LONG_DEVICE_NAME}"
sleep 1
fi
! lxc exec v2 -- mountpoint /mnt/bar2 || false # Just tests for mountpoint disconnected, not unmount.
lxc delete -f v2

Expand Down

0 comments on commit 18d6002

Please sign in to comment.