From d2b4bdf108990828f4c93fa9c9520c20910b2277 Mon Sep 17 00:00:00 2001 From: hamistao Date: Tue, 10 Dec 2024 09:43:40 -0300 Subject: [PATCH] test/suites: Test `security.shared` is only allowed in block vols Signed-off-by: hamistao --- test/suites/storage_local_volume_handling.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/suites/storage_local_volume_handling.sh b/test/suites/storage_local_volume_handling.sh index 5631ebd518f8..9d821c964865 100755 --- a/test/suites/storage_local_volume_handling.sh +++ b/test/suites/storage_local_volume_handling.sh @@ -66,6 +66,17 @@ test_storage_local_volume_handling() { lxc storage volume set "${pool}" vol1 user.foo=snap0 lxc storage volume set "${pool}" vol1 snapshots.expiry=1H + lxc storage volume create "${pool}" blockVol --type=block + lxc storage volume create "${pool}" isoVol --type=iso + + # security.shared is only allowed for block volumes + ! lxc storage volume set default vol1 security.shared true || false + ! lxc storage volume set default isoVol security.shared true || false + lxc storage volume set default blockVol security.shared true + + lxc storage volume delete blockVol + lxc storage volume delete isoVol + # This will create the snapshot vol1/snap0 lxc storage volume snapshot "${pool}" vol1