Skip to content

Commit 281079d

Browse files
committed
Drop now-unused sr_disk_4k
Signed-off-by: Yann Dirson <[email protected]>
1 parent 2e52ce8 commit 281079d

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_4k',
124123
'unused_disks',
125124
'unused_4k_disks',
126125
]
@@ -397,30 +396,6 @@ def unused_4k_disks(unused_disks: dict[Host, list[DiskDevName]]
397396
logging.debug("available 4k disks collected: %s", {host.hostname_or_ip: value for host, value in ret.items()})
398397
yield ret
399398

400-
@pytest.fixture(scope='session')
401-
def sr_disk_4k(pytestconfig, host: Host) -> Generator[DiskDevName]:
402-
"""
403-
Disk DEVICE NAME with 4KB blocksize available on FIRST POOL MASTER.
404-
405-
Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
406-
return requested device (abort if not present).
407-
"""
408-
disks = pytestconfig.getoption("sr_disk_4k")
409-
if len(disks) != 1:
410-
pytest.fail("This test requires exactly one --sr-disks-4k parameter")
411-
disk = disks[0]
412-
if disk == "auto":
413-
logging.info(">> Check for the presence of a free 4KiB block device on the master host")
414-
disks = host.available_disks(4096)
415-
assert len(disks) > 0, "a free 4KiB block device is required on the master host"
416-
disk = disks[0]
417-
logging.info(f">> Found free 4KiB block device(s) on hostA1: {' '.join(disks)}. Using {disk}.")
418-
else:
419-
logging.info(f">> Check that 4KiB block device {disk} is available on the master host")
420-
assert disk in host.available_disks(4096), \
421-
f"4KiB block device {disk} must be available for use on master host"
422-
yield disk
423-
424399
@pytest.fixture(scope='session')
425400
def pool_with_unused_disk(host: Host, unused_disks: dict[Host, list[DiskDevName]]) -> Pool:
426401
for h in host.pool.hosts:

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_disks: the test needs a free 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)