Skip to content

Commit 6ac9204

Browse files
committed
Drop now-unused sr_disk fixture and flag
Signed-off-by: Yann Dirson <[email protected]>
1 parent 08be166 commit 6ac9204

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

conftest.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def pytest_collection_modifyitems(items, config):
129129
'windows_vm',
130130
'hostA2',
131131
'hostB1',
132-
'sr_disk',
133132
'sr_disk_4k',
134133
'unused_512B_disks',
135134
]
@@ -404,30 +403,6 @@ def unused_512B_disks(disks: dict[Host, list[Host.BlockDeviceInfo]]
404403
logging.debug("available disks collected: %s", {host.hostname_or_ip: value for host, value in ret.items()})
405404
return ret
406405

407-
@pytest.fixture(scope='session')
408-
def sr_disk(pytestconfig, host: Host) -> Generator[DiskDevName]:
409-
"""
410-
Disk DEVICE NAME available on FIRST POOL MASTER.
411-
412-
Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
413-
return requested device (abort if not present).
414-
"""
415-
disks = pytestconfig.getoption("sr_disk")
416-
if len(disks) != 1:
417-
pytest.fail("This test requires exactly one --sr-disk parameter")
418-
disk = disks[0]
419-
if disk == "auto":
420-
logging.info(">> Check for the presence of a free disk device on the master host")
421-
disks = host.available_disks()
422-
assert len(disks) > 0, "a free disk device is required on the master host"
423-
disk = disks[0]
424-
logging.info(f">> Found free disk device(s) on hostA1: {' '.join(disks)}. Using {disk}.")
425-
else:
426-
logging.info(f">> Check that disk or block device {disk} is available on the master host")
427-
assert disk in host.available_disks(), \
428-
f"disk or block device {disk} is either not present or already used on master host"
429-
yield disk
430-
431406
@pytest.fixture(scope='session')
432407
def sr_disk_4k(pytestconfig, host: Host) -> Generator[DiskDevName]:
433408
"""

pytest.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ markers =
99
# * Host-related markers, automatically set based on fixtures
1010
hostA2: a second member in the first pool.
1111
hostB1: a second pool.
12-
sr_disk: the test needs a free disk or writable block device that it can erase.
1312
sr_disk_4k: the test needs a free 4KiB block device that it can erase.
1413
unused_512B_disks: the test needs one or more free 512B-blocks disk or writable block device that it can erase.
1514

0 commit comments

Comments
 (0)