Skip to content

Commit 48afd3c

Browse files
committed
storage: Parametrize xva_export_import over the new with_snapshot parameter
Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
1 parent e26078e commit 48afd3c

7 files changed

Lines changed: 21 additions & 14 deletions

File tree

tests/storage/ext/test_ext_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_ext_sr: VDI, vdi_op: Coalesc
9292

9393
@pytest.mark.small_vm
9494
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
95-
def test_xva_export_import(self, vm_on_ext_sr: VM, compression: XVACompression) -> None:
96-
xva_export_import(vm_on_ext_sr, compression)
95+
@pytest.mark.parametrize("with_snapshot", [True, False])
96+
def test_xva_export_import(self, vm_on_ext_sr: VM, compression: XVACompression, with_snapshot: bool) -> None:
97+
xva_export_import(vm_on_ext_sr, compression, with_snapshot)
9798

9899
@pytest.mark.small_vm
99100
def test_vdi_export_import(self, storage_test_vm: VM, ext_sr: SR, image_format: ImageFormat) -> None:

tests/storage/lvm/test_lvm_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, vdi_op: Coalesc
149149

150150
@pytest.mark.small_vm
151151
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
152-
def test_xva_export_import(self, vm_on_lvm_sr: VM, compression: XVACompression) -> None:
153-
xva_export_import(vm_on_lvm_sr, compression)
152+
@pytest.mark.parametrize("with_snapshot", [True, False])
153+
def test_xva_export_import(self, vm_on_lvm_sr: VM, compression: XVACompression, with_snapshot: bool) -> None:
154+
xva_export_import(vm_on_lvm_sr, compression, with_snapshot)
154155

155156
@pytest.mark.small_vm
156157
def test_vdi_export_import(self, storage_test_vm: VM, lvm_sr: SR, image_format: ImageFormat) -> None:

tests/storage/lvmoiscsi/test_lvmoiscsi_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_lvmoiscsi_sr: VDI, vdi_op: C
7474

7575
@pytest.mark.small_vm
7676
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
77-
def test_xva_export_import(self, vm_on_lvmoiscsi_sr: VM, compression: XVACompression) -> None:
78-
xva_export_import(vm_on_lvmoiscsi_sr, compression)
77+
@pytest.mark.parametrize("with_snapshot", [True, False])
78+
def test_xva_export_import(self, vm_on_lvmoiscsi_sr: VM, compression: XVACompression, with_snapshot: bool) -> None:
79+
xva_export_import(vm_on_lvmoiscsi_sr, compression, with_snapshot)
7980

8081
@pytest.mark.small_vm
8182
def test_vdi_export_import(self, storage_test_vm: VM, lvmoiscsi_sr: SR, image_format: ImageFormat) -> None:

tests/storage/nfs/test_nfs_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ def test_coalesce(self, storage_test_vm: VM, dispatch_nfs: VDI, vdi_op: Coalesce
124124
@pytest.mark.usefixtures('vm_ref')
125125
@pytest.mark.parametrize('dispatch_nfs', ['vm_on_nfs_sr', 'vm_on_nfs4_sr'], indirect=True)
126126
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
127-
def test_xva_export_import(self, dispatch_nfs: VM, compression: XVACompression) -> None:
128-
xva_export_import(dispatch_nfs, compression)
127+
@pytest.mark.parametrize("with_snapshot", [True, False])
128+
def test_xva_export_import(self, dispatch_nfs: VM, compression: XVACompression, with_snapshot: bool) -> None:
129+
xva_export_import(dispatch_nfs, compression, with_snapshot)
129130

130131
@pytest.mark.small_vm
131132
@pytest.mark.parametrize('dispatch_nfs', ['nfs_sr', 'nfs4_sr'], indirect=True)

tests/storage/xfs/test_xfs_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_xfs_sr: VDI, vdi_op: Coalesc
109109

110110
@pytest.mark.small_vm
111111
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
112-
def test_xva_export_import(self, vm_on_xfs_sr: VM, compression: XVACompression) -> None:
113-
xva_export_import(vm_on_xfs_sr, compression)
112+
@pytest.mark.parametrize("with_snapshot", [True, False])
113+
def test_xva_export_import(self, vm_on_xfs_sr: VM, compression: XVACompression, with_snapshot: bool) -> None:
114+
xva_export_import(vm_on_xfs_sr, compression, with_snapshot)
114115

115116
@pytest.mark.small_vm
116117
def test_vdi_export_import(self, storage_test_vm: VM, xfs_sr: SR, image_format: ImageFormat) -> None:

tests/storage/zfs/test_zfs_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_zfs_sr: VDI, vdi_op: Coalesc
106106

107107
@pytest.mark.small_vm
108108
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
109-
def test_xva_export_import(self, vm_on_zfs_sr: VM, compression: XVACompression) -> None:
110-
xva_export_import(vm_on_zfs_sr, compression)
109+
@pytest.mark.parametrize("with_snapshot", [True, False])
110+
def test_xva_export_import(self, vm_on_zfs_sr: VM, compression: XVACompression, with_snapshot: bool) -> None:
111+
xva_export_import(vm_on_zfs_sr, compression, with_snapshot)
111112

112113
@pytest.mark.small_vm
113114
def test_vdi_export_import(self, storage_test_vm: VM, zfs_sr: SR, image_format: ImageFormat) -> None:

tests/storage/zfsvol/test_zfsvol_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_zfsvol_sr: VDI, vdi_op: Coal
7171

7272
@pytest.mark.small_vm
7373
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
74-
def test_xva_export_import(self, vm_on_zfsvol_sr: VM, compression: XVACompression) -> None:
75-
xva_export_import(vm_on_zfsvol_sr, compression)
74+
@pytest.mark.parametrize("with_snapshot", [True, False])
75+
def test_xva_export_import(self, vm_on_zfsvol_sr: VM, compression: XVACompression, with_snapshot: bool) -> None:
76+
xva_export_import(vm_on_zfsvol_sr, compression, with_snapshot)
7677

7778
@pytest.mark.small_vm
7879
def test_vdi_export_import(self, storage_test_vm: VM, zfsvol_sr: SR, image_format: ImageFormat) -> None:

0 commit comments

Comments
 (0)