Skip to content

Commit 2d954c8

Browse files
committed
Drop now-unused sr_disk fixture and flag
Signed-off-by: Yann Dirson <[email protected]>
1 parent 933204a commit 2d954c8

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
@@ -120,7 +120,6 @@ def pytest_collection_modifyitems(items, config):
120120
'windows_vm',
121121
'hostA2',
122122
'hostB1',
123-
'sr_disk',
124123
'sr_disk_4k',
125124
'unused_disks',
126125
]
@@ -388,30 +387,6 @@ def unused_disks(disks: dict[Host, list[DiskDevName]]
388387
logging.debug("available disks collected: %s", {host.hostname_or_ip: value for host, value in ret.items()})
389388
yield ret
390389

391-
@pytest.fixture(scope='session')
392-
def sr_disk(pytestconfig, host: Host) -> Generator[DiskDevName]:
393-
"""
394-
Disk DEVICE NAME available on FIRST POOL MASTER.
395-
396-
Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
397-
return requested device (abort if not present).
398-
"""
399-
disks = pytestconfig.getoption("sr_disk")
400-
if len(disks) != 1:
401-
pytest.fail("This test requires exactly one --sr-disk parameter")
402-
disk = disks[0]
403-
if disk == "auto":
404-
logging.info(">> Check for the presence of a free disk device on the master host")
405-
disks = host.available_disks()
406-
assert len(disks) > 0, "a free disk device is required on the master host"
407-
disk = disks[0]
408-
logging.info(f">> Found free disk device(s) on hostA1: {' '.join(disks)}. Using {disk}.")
409-
else:
410-
logging.info(f">> Check that disk or block device {disk} is available on the master host")
411-
assert disk in host.available_disks(), \
412-
f"disk or block device {disk} is either not present or already used on master host"
413-
yield disk
414-
415390
@pytest.fixture(scope='session')
416391
def sr_disk_4k(pytestconfig, host: Host) -> Generator[DiskDevName]:
417392
"""

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_disks: the test needs a free disk or writable block device that it can erase.
1514

0 commit comments

Comments
 (0)