tests: Add test for DeviceDisk.paths_in_use_by

This commit is contained in:
taoky
2024-07-01 13:41:38 +08:00
committed by Pavel Hrdina
parent 328cabca8f
commit 0c981eec58

View File

@@ -114,6 +114,14 @@ def test_disk_path_in_use_kernel():
assert vms == ["test-arm-kernel"]
def test_disk_paths_in_use():
conn = utils.URIs.open_kvm()
vms = virtinst.DeviceDisk.paths_in_use_by(
conn, ["/pool-dir/test-arm-kernel", "/pool-dir/test-arm-initrd"])
assert vms == [["test-arm-kernel"], ["test-arm-kernel"]]
def test_disk_diskbackend_misc():
# Test get_size() with vol_install
conn = utils.URIs.open_testdefault_cached()