Commit 698c3902 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪 Committed by Julien Muchembled

kvm/slaprunner: skip tests that fail due to missing rdiff-backup in Python 3

See merge request nexedi/slapos!779
parent c8382bce
...@@ -40,6 +40,7 @@ from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass ...@@ -40,6 +40,7 @@ from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
has_kvm = os.access('/dev/kvm', os.R_OK|os.W_OK) has_kvm = os.access('/dev/kvm', os.R_OK|os.W_OK)
skipUnlessKvm = unittest.skipUnless(has_kvm, 'kvm not loaded or not allowed') skipUnlessKvm = unittest.skipUnless(has_kvm, 'kvm not loaded or not allowed')
skipIfPython3 = unittest.skipIf(six.PY3, 'rdiff-backup is not compatible with Python 3 yet')
if has_kvm: if has_kvm:
setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -327,6 +328,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase): ...@@ -327,6 +328,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
) )
self.assertIn('<title>noVNC</title>', result.text) self.assertIn('<title>noVNC</title>', result.text)
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase): class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'akcb' __partition_reference__ = 'akcb'
...@@ -365,6 +367,7 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase): ...@@ -365,6 +367,7 @@ class TestAccessKvmClusterBootstrap(MonitorAccessMixin, InstanceTestCase):
) )
self.assertIn('<title>noVNC</title>', result.text) self.assertIn('<title>noVNC</title>', result.text)
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestInstanceResilient(InstanceTestCase): class TestInstanceResilient(InstanceTestCase):
__partition_reference__ = 'ir' __partition_reference__ = 'ir'
...@@ -392,6 +395,7 @@ class TestInstanceResilient(InstanceTestCase): ...@@ -392,6 +395,7 @@ class TestInstanceResilient(InstanceTestCase):
'takeover-kvm-1-url', 'takeover-kvm-1-url',
'url'])) 'url']))
@skipIfPython3
@skipUnlessKvm @skipUnlessKvm
class TestAccessResilientAdditional(InstanceTestCase): class TestAccessResilientAdditional(InstanceTestCase):
__partition_reference__ = 'ara' __partition_reference__ = 'ara'
......
...@@ -46,6 +46,8 @@ from slapos.recipe.librecipe import generateHashFromFiles ...@@ -46,6 +46,8 @@ from slapos.recipe.librecipe import generateHashFromFiles
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
from slapos.util import bytes2str from slapos.util import bytes2str
skipIfPython3 = unittest.skipIf(six.PY3, 'rdiff-backup is not compatible with Python 3 yet')
setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', os.path.join(os.path.dirname(__file__), '..',
...@@ -476,6 +478,7 @@ class TestCustomFrontend(SlaprunnerTestCase): ...@@ -476,6 +478,7 @@ class TestCustomFrontend(SlaprunnerTestCase):
parameter_dict['custom-frontend-url'], parameter_dict['custom-frontend-url'],
'https://www.erp5.com') 'https://www.erp5.com')
@skipIfPython3
class TestResilientInstance(SlaprunnerTestCase): class TestResilientInstance(SlaprunnerTestCase):
instance_max_retry = 20 instance_max_retry = 20
...@@ -502,12 +505,14 @@ class TestResilientInstance(SlaprunnerTestCase): ...@@ -502,12 +505,14 @@ class TestResilientInstance(SlaprunnerTestCase):
'url', 'url',
'webdav-url'])) 'webdav-url']))
@skipIfPython3
class TestResilientCustomFrontend(TestCustomFrontend): class TestResilientCustomFrontend(TestCustomFrontend):
instance_max_retry = 20 instance_max_retry = 20
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return 'resilient' return 'resilient'
@skipIfPython3
class TestResilientWebInstance(TestWeb): class TestResilientWebInstance(TestWeb):
instance_max_retry = 20 instance_max_retry = 20
@classmethod @classmethod
...@@ -518,6 +523,7 @@ class TestResilientWebInstance(TestWeb): ...@@ -518,6 +523,7 @@ class TestResilientWebInstance(TestWeb):
pass # Disable until we can write on runner0 rather them pass # Disable until we can write on runner0 rather them
# on root partition # on root partition
@skipIfPython3
class TestResilientWebrunnerBasicUsage(TestWebRunnerBasicUsage): class TestResilientWebrunnerBasicUsage(TestWebRunnerBasicUsage):
instance_max_retry = 20 instance_max_retry = 20
@classmethod @classmethod
...@@ -525,12 +531,14 @@ class TestResilientWebrunnerBasicUsage(TestWebRunnerBasicUsage): ...@@ -525,12 +531,14 @@ class TestResilientWebrunnerBasicUsage(TestWebRunnerBasicUsage):
return 'resilient' return 'resilient'
@skipIfPython3
class TestResilientWebrunnerAutorun(TestWebRunnerAutorun): class TestResilientWebrunnerAutorun(TestWebRunnerAutorun):
instance_max_retry = 20 instance_max_retry = 20
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return 'resilient' return 'resilient'
@skipIfPython3
class TestResilientDummyInstance(SlaprunnerTestCase): class TestResilientDummyInstance(SlaprunnerTestCase):
instance_max_retry = 20 instance_max_retry = 20
@classmethod @classmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment