Skip to content

Commit 9e50715

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 517f662 commit 9e50715

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):
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):
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):

tests/storage/lvm/test_lvm_sr.py

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

146146
@pytest.mark.small_vm
147147
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
148-
def test_xva_export_import(self, vm_on_lvm_sr: VM, compression: XVACompression):
149-
xva_export_import(vm_on_lvm_sr, compression)
148+
@pytest.mark.parametrize("with_snapshot", [True, False])
149+
def test_xva_export_import(self, vm_on_lvm_sr: VM, compression: XVACompression, with_snapshot: bool):
150+
xva_export_import(vm_on_lvm_sr, compression, with_snapshot)
150151

151152
@pytest.mark.small_vm
152153
def test_vdi_export_import(self, storage_test_vm: VM, lvm_sr: SR, image_format: ImageFormat):

tests/storage/lvmoiscsi/test_lvmoiscsi_sr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ def test_coalesce(self, storage_test_vm: 'VM', vdi_on_lvmoiscsi_sr: 'VDI', vdi_o
6969

7070
@pytest.mark.small_vm
7171
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
72-
def test_xva_export_import(self, vm_on_lvmoiscsi_sr: VM, compression: XVACompression):
73-
xva_export_import(vm_on_lvmoiscsi_sr, compression)
72+
@pytest.mark.parametrize("with_snapshot", [True, False])
73+
def test_xva_export_import(self, vm_on_lvmoiscsi_sr: VM, compression: XVACompression, with_snapshot: bool):
74+
xva_export_import(vm_on_lvmoiscsi_sr, compression, with_snapshot)
7475

7576
@pytest.mark.small_vm
7677
def test_vdi_export_import(self, storage_test_vm: VM, lvmoiscsi_sr: SR, image_format: ImageFormat):

tests/storage/nfs/test_nfs_sr.py

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

129130
@pytest.mark.small_vm
130131
@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):
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):
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):

tests/storage/zfs/test_zfs_sr.py

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

112112
@pytest.mark.small_vm
113113
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
114-
def test_xva_export_import(self, vm_on_zfs_sr: VM, compression: XVACompression):
115-
xva_export_import(vm_on_zfs_sr, compression)
114+
@pytest.mark.parametrize("with_snapshot", [True, False])
115+
def test_xva_export_import(self, vm_on_zfs_sr: VM, compression: XVACompression, with_snapshot: bool):
116+
xva_export_import(vm_on_zfs_sr, compression, with_snapshot)
116117

117118
@pytest.mark.small_vm
118119
def test_vdi_export_import(self, storage_test_vm: VM, zfs_sr: SR, image_format: ImageFormat):

tests/storage/zfsvol/test_zfsvol_sr.py

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

6969
@pytest.mark.small_vm
7070
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
71-
def test_xva_export_import(self, vm_on_zfsvol_sr: VM, compression: XVACompression):
72-
xva_export_import(vm_on_zfsvol_sr, compression)
71+
@pytest.mark.parametrize("with_snapshot", [True, False])
72+
def test_xva_export_import(self, vm_on_zfsvol_sr: VM, compression: XVACompression, with_snapshot: bool):
73+
xva_export_import(vm_on_zfsvol_sr, compression, with_snapshot)
7374

7475
@pytest.mark.small_vm
7576
def test_vdi_export_import(self, storage_test_vm: VM, zfsvol_sr: SR, image_format: ImageFormat):

0 commit comments

Comments
 (0)