Skip to content

Commit 539d0f3

Browse files
authored
Merge pull request #533 from xcp-ng/pcoval/review/master
zfsvol: Mark test_xva_export_import as xfail until properly fixed Related-to: XCPNG-3297
2 parents 488cbdc + 944cc1b commit 539d0f3

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

conftest.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import pytest
44

5+
import argparse
56
import itertools
67
import logging
78
import os
@@ -50,6 +51,15 @@
5051
CACHE_IMPORTED_VM = False
5152
assert CACHE_IMPORTED_VM in [True, False]
5253

54+
class SplitCommaAction(argparse.Action):
55+
def __call__(self, parser, namespace, values, option_string=None):
56+
items = getattr(namespace, self.dest, None)
57+
if items is None:
58+
items = []
59+
if isinstance(values, str):
60+
items.extend([v.strip() for v in values.split(",") if v.strip()])
61+
setattr(namespace, self.dest, items)
62+
5363
# pytest hooks
5464

5565
def pytest_addoption(parser: pytest.Parser) -> None:
@@ -99,7 +109,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
99109
)
100110
parser.addoption(
101111
"--image-format",
102-
action="append",
112+
action=SplitCommaAction,
103113
default=[],
104114
help="Format of VDI to execute tests on."
105115
"Example: vhd,qcow2"

tests/storage/zfsvol/test_zfsvol_sr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def test_invalid_vdi_size(self, zfsvol_sr: SR, image_format: ImageFormat):
9393
zfsvol_sr.create_vdi(virtual_size=MAX_VDI_SIZE[image_format] + 1)
9494
assert 'VDI Invalid size' in excinfo.value.stdout
9595

96+
@pytest.mark.xfail # Failing on Exception "Only snapshots can be cloned!"
9697
@pytest.mark.small_vm
9798
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
9899
def test_xva_export_import(self, vm_on_zfsvol_sr: VM, compression: XVACompression, temp_large_dir: str,

0 commit comments

Comments
 (0)