Skip to content

Commit 4077770

Browse files
committed
Drop now-unused sr_disk_4k
Signed-off-by: Yann Dirson <[email protected]>
1 parent a6f83ea commit 4077770

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_4k',
133132
'unused_512B_disks',
134133
'unused_4k_disks',
135134
]
@@ -415,30 +414,6 @@ def unused_4k_disks(disks: dict[Host, list[Host.BlockDeviceInfo]]
415414
logging.debug("available 4k disks collected: %s", {host.hostname_or_ip: value for host, value in ret.items()})
416415
return ret
417416

418-
@pytest.fixture(scope='session')
419-
def sr_disk_4k(pytestconfig, host: Host) -> Generator[DiskDevName]:
420-
"""
421-
Disk DEVICE NAME with 4KB blocksize available on FIRST POOL MASTER.
422-
423-
Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
424-
return requested device (abort if not present).
425-
"""
426-
disks = pytestconfig.getoption("sr_disk_4k")
427-
if len(disks) != 1:
428-
pytest.fail("This test requires exactly one --sr-disks-4k parameter")
429-
disk = disks[0]
430-
if disk == "auto":
431-
logging.info(">> Check for the presence of a free 4KiB block device on the master host")
432-
disks = host.available_disks(4096)
433-
assert len(disks) > 0, "a free 4KiB block device is required on the master host"
434-
disk = disks[0]
435-
logging.info(f">> Found free 4KiB block device(s) on hostA1: {' '.join(disks)}. Using {disk}.")
436-
else:
437-
logging.info(f">> Check that 4KiB block device {disk} is available on the master host")
438-
assert disk in host.available_disks(4096), \
439-
f"4KiB block device {disk} must be available for use on master host"
440-
yield disk
441-
442417
@pytest.fixture(scope='session')
443418
def pool_with_unused_512B_disk(host: Host, unused_512B_disks: dict[Host, list[Host.BlockDeviceInfo]]) -> Pool:
444419
"""Returns the first pool, ensuring all hosts have at least one unused 512-bytes-blocks disk."""

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_4k: the test needs a free 4KiB block device that it can erase.
1312
unused_512B_disks: the test needs one or more free 512B-blocks disk or writable block device that it can erase.
1413
unused_4k_disks: the test needs a free 4KiB block device that it can erase.
1514

0 commit comments

Comments
 (0)