Skip to content

Commit

Permalink
Execute quicktest for each SM driver
Browse files Browse the repository at this point in the history
- Use the `-sr` option of quicktest to run it on a specific SR
- Remove plain quicktest test that ran it at once on all SRs available
- Remove `quicktest` job as the test no longer exists

Co-authored-by: Guillaume Thouvenin <[email protected]>
Co-authored-by: Benjamin Reis <[email protected]>
Signed-off-by: Ronan Abhamon <[email protected]>
  • Loading branch information
3 people committed Oct 4, 2023
1 parent 3da3bdf commit 806c732
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 21 deletions.
10 changes: 0 additions & 10 deletions jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@
"paths": ["tests/packages"],
"markers": "",
},
"quicktest": {
"description": "XAPI's quicktest, not so quick by the way",
"requirements": [
"Any pool.",
"Execution depends on the SRs present, as each SR from the pool will get tested.",
],
"nb_pools": 1,
"params": {},
"paths": ["tests/quicktest"],
},
"storage-main": {
"description": "tests all storage drivers, but avoids migrations and reboots",
"requirements": [
Expand Down
3 changes: 3 additions & 0 deletions lib/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ def create_vdi(self, name_label, virtual_size=64):
'sr-uuid': self.uuid
})
return VDI(self, vdi_uuid)

def run_quicktest(self):
self.pool.master.ssh(['/opt/xensource/debug/quicktest', '-sr', self.uuid])
Empty file removed tests/quicktest/__init__.py
Empty file.
11 changes: 0 additions & 11 deletions tests/quicktest/test_quicktest.py

This file was deleted.

3 changes: 3 additions & 0 deletions tests/storage/cephfs/test_cephfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def test_create_and_destroy_sr(self, host, cephfs_device_config, pool_with_ceph)

@pytest.mark.usefixtures("cephfs_sr")
class TestCephFSSR:
def test_quicktest(self, cephfs_sr):
cephfs_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_cephfs_sr):
assert not vdi_is_open(vdi_on_cephfs_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/ext/test_ext_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def test_create_and_destroy_sr(self, host, sr_disk):

@pytest.mark.usefixtures("ext_sr")
class TestEXTSR:
def test_quicktest(self, ext_sr):
ext_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_ext_sr):
assert not vdi_is_open(vdi_on_ext_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/glusterfs/test_glusterfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def test_create_and_destroy_sr(self, host, glusterfs_device_config, pool_with_gl

@pytest.mark.usefixtures("sr_disk_for_all_hosts", "glusterfs_sr")
class TestGlusterFSSR:
def test_quicktest(self, glusterfs_sr):
glusterfs_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_glusterfs_sr):
assert not vdi_is_open(vdi_on_glusterfs_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/linstor/test_linstor_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def test_create_and_destroy_sr(self, pool_with_linstor):

@pytest.mark.usefixtures("linstor_sr")
class TestLinstorSR:
def test_quicktest(self, linstor_sr):
linstor_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_linstor_sr):
assert not vdi_is_open(vdi_on_linstor_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/lvm/test_lvm_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def test_create_and_destroy_sr(self, host, sr_disk):

@pytest.mark.usefixtures("lvm_sr")
class TestLVMSR:
def test_quicktest(self, lvm_sr):
lvm_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_lvm_sr):
assert not vdi_is_open(vdi_on_lvm_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/lvmoiscsi/test_lvmoiscsi_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def test_create_and_destroy_sr(self, host, lvmoiscsi_device_config):

@pytest.mark.usefixtures("lvmoiscsi_sr")
class TestLVMOISCSISR:
def test_quicktest(self, lvmoiscsi_sr):
lvmoiscsi_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_lvmoiscsi_sr):
assert not vdi_is_open(vdi_on_lvmoiscsi_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/moosefs/test_moosefs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def test_create_and_destroy_sr(self, moosefs_device_config, pool_with_moosefs_en

@pytest.mark.usefixtures("moosefs_sr")
class TestMooseFSSR:
def test_quicktest(self, moosefs_sr):
moosefs_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_moosefs_sr):
assert not vdi_is_open(vdi_on_moosefs_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/nfs/test_nfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def test_create_and_destroy_sr(self, host, nfs_device_config):

@pytest.mark.usefixtures("nfs_sr")
class TestNFSSR:
def test_quicktest(self, nfs_sr):
nfs_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_nfs_sr):
assert not vdi_is_open(vdi_on_nfs_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/xfs/test_xfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def test_create_and_destroy_sr(self, sr_disk, host_with_xfsprogs):

@pytest.mark.usefixtures("xfs_sr")
class TestXFSSR:
def test_quicktest(self, xfs_sr):
xfs_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_xfs_sr):
assert not vdi_is_open(vdi_on_xfs_sr)

Expand Down
3 changes: 3 additions & 0 deletions tests/storage/zfs/test_zfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def test_create_and_destroy_sr(self, host):

@pytest.mark.usefixtures("zpool_vol0")
class TestZFSSR:
def test_quicktest(self, zfs_sr):
zfs_sr.run_quicktest()

def test_vdi_is_not_open(self, vdi_on_zfs_sr):
assert not vdi_is_open(vdi_on_zfs_sr)

Expand Down

0 comments on commit 806c732

Please sign in to comment.