Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tom Niget
slapos
Commits
698c3902
Commit
698c3902
authored
May 19, 2020
by
Bryton Lacquement
🚪
Committed by
Julien Muchembled
Jul 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm/slaprunner: skip tests that fail due to missing rdiff-backup in Python 3
See merge request
!779
parent
c8382bce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
software/kvm/test/test.py
software/kvm/test/test.py
+4
-0
software/slaprunner/test/test.py
software/slaprunner/test/test.py
+8
-0
No files found.
software/kvm/test/test.py
View file @
698c3902
...
@@ -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'
...
...
software/slaprunner/test/test.py
View file @
698c3902
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment