Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
8456c7c8
Commit
8456c7c8
authored
Jun 05, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
38441c3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+5
-10
erp5/util/testnode/NodeTestSuite.py
erp5/util/testnode/NodeTestSuite.py
+7
-2
No files found.
erp5/tests/testERP5TestNode.py
View file @
8456c7c8
...
...
@@ -369,9 +369,7 @@ branch = foo
return
[]
test_node
=
self
.
getTestNode
()
test_node
.
slapos_controler
=
SlapOSControler
(
self
.
working_directory
,
test_node
.
config
,
self
.
log
)
runner
=
UnitTestRunner
(
test_node
)
# Create and initialise/regenerate a nodetestsuite
node_test_suite
=
test_node
.
getNodeTestSuite
(
'foo'
)
...
...
@@ -380,7 +378,7 @@ branch = foo
node_test_suite
.
revision
=
'dummy'
# Path to the dummy runable
run_test_suite_path
=
_createPath
(
os
.
path
.
join
(
test_node
.
slapos_controler
.
instance_root
,
'a/bin'
),
'runTestSuite'
)
os
.
path
.
join
(
runner
.
slapos_controler
.
instance_root
,
'a/bin'
),
'runTestSuite'
)
def
checkRunTestSuiteParameters
(
additional_parameter_list
=
None
):
ProcessManager
.
getSupportedParameterSet
=
patch_getSupportedParameterSet
...
...
@@ -388,7 +386,7 @@ branch = foo
runner
=
UnitTestRunner
(
test_node
)
runner
.
runTestSuite
(
node_test_suite
,
"http://foo.bar"
)
expected_parameter_list
=
[
'%s/a/bin/runTestSuite'
%
(
runner
.
testnode
.
slapos_controler
.
instance_root
),
'--test_suite'
,
'Foo'
,
'--revision'
,
%
(
runner
.
slapos_controler
.
instance_root
),
'--test_suite'
,
'Foo'
,
'--revision'
,
'dummy'
,
'--test_suite_title'
,
'Foo-Test'
,
'--node_quantity'
,
3
,
'--master_url'
,
'http://foo.bar'
]
if
additional_parameter_list
:
...
...
@@ -505,10 +503,7 @@ branch = foo
original_createTestResult
=
TaskDistributionTool
.
createTestResult
TaskDistributionTool
.
createTestResult
=
patch_createTestResult
test_node
=
self
.
getTestNode
()
test_node_slapos
=
SlapOSInstance
()
runner
=
UnitTestRunner
(
test_node
)
original_prepareSlapOS
=
runner
.
_prepareSlapOS
runner
.
_prepareSlapOS
=
doNothing
original_runTestSuite
=
runner
.
runTestSuite
...
...
@@ -617,7 +612,7 @@ branch = foo
original_runTestSuite
=
runner
.
runTestSuite
runner
.
runTestSuite
=
doNothing
SlapOSControler
.
initializeSlapOSControler
=
doNothing
test_
node
.
run
()
runner
.
test
node
.
run
()
self
.
assertEquals
(
counter
,
3
)
checkTestSuite
(
test_node
)
time
.
sleep
=
original_sleep
...
...
erp5/util/testnode/NodeTestSuite.py
View file @
8456c7c8
...
...
@@ -43,7 +43,10 @@ from Updater import Updater
from
erp5.util
import
taskdistribution
class
SlapOSInstance
(
object
):
"""
Base of an software instance,
store variables used during software installation
"""
def
__init__
(
self
):
self
.
retry_software_count
=
0
self
.
retry
=
False
...
...
@@ -57,7 +60,9 @@ class SlapOSInstance(object):
class
NodeTestSuite
(
SlapOSInstance
):
"""
"""
def
__init__
(
self
,
reference
):
super
(
NodeTestSuite
,
self
).
__init__
()
self
.
reference
=
reference
...
...
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