Skip to content

Commit

Permalink
no quicktst on iso sr
Browse files Browse the repository at this point in the history
Signed-off-by: BenjiReis <[email protected]>
  • Loading branch information
benjamreis committed Oct 4, 2023
1 parent b17276a commit e6488a8
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 36 deletions.
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])
4 changes: 2 additions & 2 deletions tests/storage/cephfs/test_cephfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from lib.commands import SSHCommandFailed
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2
Expand Down Expand Up @@ -43,7 +43,7 @@ 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):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/ext/test_ext_sr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, try_to_create_sr_with_missing_device, vdi_is_open
from tests.storage import try_to_create_sr_with_missing_device, vdi_is_open

# Requirements:
# - one XCP-ng host with an additional unused disk for the SR
Expand All @@ -27,7 +27,7 @@ def test_create_and_destroy_sr(self, host, sr_disk):
@pytest.mark.usefixtures("ext_sr")
class TestEXTSR:
def test_quicktest(self, ext_sr):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/glusterfs/test_glusterfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from lib.commands import SSHCommandFailed
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2 with an additional unused disk for the SR
Expand Down Expand Up @@ -42,7 +42,7 @@ 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):
run_quicktest_on_sr(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
4 changes: 0 additions & 4 deletions tests/storage/iso/test_cifs_iso_sr.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import pytest
import logging
import os

from .conftest import copy_tools_iso_to_iso_sr, check_iso_mount_and_read_from_vm, remove_iso_from_sr
from tests.storage import run_quicktest_on_sr

# Requirements:
# From --hosts parameter:
Expand Down Expand Up @@ -37,8 +35,6 @@ def test_create_and_destroy_sr(self, host, cifs_iso_device_config):
@pytest.mark.small_vm
@pytest.mark.usefixtures("cifs_iso_sr")
class TestCIFSISOSR:
def test_quicktest(self, cifs_iso_sr):
run_quicktest_on_sr(cifs_iso_sr)

def test_iso_mount_and_read(self, host, cifs_iso_sr, running_unix_vm):
# create the ISO SR on CIFS
Expand Down
5 changes: 0 additions & 5 deletions tests/storage/iso/test_local_iso_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from .conftest import create_local_iso_sr, copy_tools_iso_to_iso_sr, \
check_iso_mount_and_read_from_vm, remove_iso_from_sr
from tests.storage import run_quicktest_on_sr

# Requirements:
# From --hosts parameter:
Expand Down Expand Up @@ -43,10 +42,6 @@ def test_create_and_destroy_sr(self, host, formatted_and_mounted_ext4_disk):
@pytest.mark.small_vm
@pytest.mark.usefixtures("local_iso_sr")
class TestLocalISOSR:
def test_quicktest(self, local_iso_sr):
sr, location = local_iso_sr
run_quicktest_on_sr(sr)

def test_iso_mount_and_read(self, host, local_iso_sr, unix_vm):
sr, location = local_iso_sr
iso_path = copy_tools_iso_to_iso_sr(host, sr, location)
Expand Down
4 changes: 0 additions & 4 deletions tests/storage/iso/test_nfs_iso_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging

from .conftest import copy_tools_iso_to_iso_sr, check_iso_mount_and_read_from_vm, remove_iso_from_sr
from tests.storage import run_quicktest_on_sr

# Requirements:
# From --hosts parameter:
Expand Down Expand Up @@ -39,9 +38,6 @@ def test_create_and_destroy_sr(self, host, nfs_iso_device_config):
@pytest.mark.small_vm
@pytest.mark.usefixtures("nfs_iso_sr")
class TestNFSISOSR:
def test_quicktest(self, nfs_iso_sr):
run_quicktest_on_sr(nfs_iso_sr)

def test_iso_mount_and_read(self, host, nfs_iso_sr, running_unix_vm):
# create the ISO SR on NFS
sr = nfs_iso_sr
Expand Down
4 changes: 2 additions & 2 deletions tests/storage/linstor/test_linstor_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .conftest import STORAGE_POOL_NAME, LINSTOR_PACKAGE
from lib.commands import SSHCommandFailed
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2 with an additional unused disk for the SR
Expand Down Expand Up @@ -53,7 +53,7 @@ def test_create_and_destroy_sr(self, pool_with_linstor):
@pytest.mark.usefixtures("linstor_sr")
class TestLinstorSR:
def test_quicktest(self, linstor_sr):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/lvm/test_lvm_sr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, try_to_create_sr_with_missing_device, vdi_is_open
from tests.storage import try_to_create_sr_with_missing_device, vdi_is_open

# Requirements:
# - one XCP-ng host with an additional unused disk for the SR
Expand All @@ -27,7 +27,7 @@ def test_create_and_destroy_sr(self, host, sr_disk):
@pytest.mark.usefixtures("lvm_sr")
class TestLVMSR:
def test_quicktest(self, lvm_sr):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/lvmoiscsi/test_lvmoiscsi_sr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2
Expand All @@ -25,7 +25,7 @@ def test_create_and_destroy_sr(self, host, lvmoiscsi_device_config):
@pytest.mark.usefixtures("lvmoiscsi_sr")
class TestLVMOISCSISR:
def test_quicktest(self, lvmoiscsi_sr):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/moosefs/test_moosefs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from lib.commands import SSHCommandFailed
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2
Expand Down Expand Up @@ -44,7 +44,7 @@ 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):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/nfs/test_nfs_sr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.0 with an additional unused disk for the SR
Expand All @@ -18,7 +18,7 @@ def test_create_and_destroy_sr(self, host, nfs_device_config):
@pytest.mark.usefixtures("nfs_sr")
class TestNFSSR:
def test_quicktest(self, nfs_sr):
run_quicktest_on_sr(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: 0 additions & 3 deletions tests/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,3 @@ def get_xapi_session():
'vdiUuid': vdi.uuid,
'srRef': master.execute_script(get_sr_ref, shebang='python')
}))

def run_quicktest_on_sr(sr):
sr.pool.master.ssh(['/opt/xensource/debug/quicktest', '-sr', sr.uuid])
4 changes: 2 additions & 2 deletions tests/storage/xfs/test_xfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from lib.commands import SSHCommandFailed
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2 with an additional unused disk for the SR
Expand Down Expand Up @@ -43,7 +43,7 @@ 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):
run_quicktest_on_sr(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
4 changes: 2 additions & 2 deletions tests/storage/zfs/test_zfs_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .conftest import VOLUME_PATH, VOLUME_NAME
from lib.commands import SSHCommandFailed
from lib.common import wait_for, vm_image
from tests.storage import run_quicktest_on_sr, vdi_is_open
from tests.storage import vdi_is_open

# Requirements:
# - one XCP-ng host >= 8.2 with an additional unused disk for the SR
Expand Down Expand Up @@ -45,7 +45,7 @@ def test_create_and_destroy_sr(self, host):
@pytest.mark.usefixtures("zpool_vol0")
class TestZFSSR:
def test_quicktest(self, zfs_sr):
run_quicktest_on_sr(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 e6488a8

Please sign in to comment.