Skip to content

Commit 18ad9aa

Browse files
committed
Drop now-unused sr_disk_4k
Signed-off-by: Yann Dirson <[email protected]>
1 parent 15c0a63 commit 18ad9aa

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

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