diff options
Diffstat (limited to 'tests/integration_tests/modules/test_disk_setup.py')
-rw-r--r-- | tests/integration_tests/modules/test_disk_setup.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/integration_tests/modules/test_disk_setup.py b/tests/integration_tests/modules/test_disk_setup.py index 76c132ad..7aaba7db 100644 --- a/tests/integration_tests/modules/test_disk_setup.py +++ b/tests/integration_tests/modules/test_disk_setup.py @@ -70,9 +70,13 @@ class TestDeviceAliases: sdb = [x for x in lsblk["blockdevices"] if x["name"] == "sdb"][0] assert len(sdb["children"]) == 2 assert sdb["children"][0]["name"] == "sdb1" - assert sdb["children"][0]["mountpoint"] == "/mnt1" assert sdb["children"][1]["name"] == "sdb2" - assert sdb["children"][1]["mountpoint"] == "/mnt2" + if "mountpoint" in sdb["children"][0]: + assert sdb["children"][0]["mountpoint"] == "/mnt1" + assert sdb["children"][1]["mountpoint"] == "/mnt2" + else: + assert sdb["children"][0]["mountpoints"] == ["/mnt1"] + assert sdb["children"][1]["mountpoints"] == ["/mnt2"] result = client.execute("mount -a") assert result.return_code == 0 assert result.stdout.strip() == "" @@ -137,9 +141,13 @@ class TestPartProbeAvailability: sdb = [x for x in lsblk["blockdevices"] if x["name"] == "sdb"][0] assert len(sdb["children"]) == 2 assert sdb["children"][0]["name"] == "sdb1" - assert sdb["children"][0]["mountpoint"] == "/mnt1" assert sdb["children"][1]["name"] == "sdb2" - assert sdb["children"][1]["mountpoint"] == "/mnt2" + if "mountpoint" in sdb["children"][0]: + assert sdb["children"][0]["mountpoint"] == "/mnt1" + assert sdb["children"][1]["mountpoint"] == "/mnt2" + else: + assert sdb["children"][0]["mountpoints"] == ["/mnt1"] + assert sdb["children"][1]["mountpoints"] == ["/mnt2"] # Not bionic because the LXD agent gets in the way of us # changing the userdata @@ -183,7 +191,10 @@ class TestPartProbeAvailability: sdb = [x for x in lsblk["blockdevices"] if x["name"] == "sdb"][0] assert len(sdb["children"]) == 1 assert sdb["children"][0]["name"] == "sdb1" - assert sdb["children"][0]["mountpoint"] == "/mnt3" + if "mountpoint" in sdb["children"][0]: + assert sdb["children"][0]["mountpoint"] == "/mnt3" + else: + assert sdb["children"][0]["mountpoints"] == ["/mnt3"] def test_disk_setup_no_partprobe( self, create_disk, client: IntegrationInstance |