Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
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
Hide 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
...
@@ -369,9 +369,7 @@ branch = foo
return
[]
return
[]
test_node
=
self
.
getTestNode
()
test_node
=
self
.
getTestNode
()
test_node
.
slapos_controler
=
SlapOSControler
(
runner
=
UnitTestRunner
(
test_node
)
self
.
working_directory
,
test_node
.
config
,
self
.
log
)
# Create and initialise/regenerate a nodetestsuite
# Create and initialise/regenerate a nodetestsuite
node_test_suite
=
test_node
.
getNodeTestSuite
(
'foo'
)
node_test_suite
=
test_node
.
getNodeTestSuite
(
'foo'
)
...
@@ -380,7 +378,7 @@ branch = foo
...
@@ -380,7 +378,7 @@ branch = foo
node_test_suite
.
revision
=
'dummy'
node_test_suite
.
revision
=
'dummy'
# Path to the dummy runable
# Path to the dummy runable
run_test_suite_path
=
_createPath
(
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
):
def
checkRunTestSuiteParameters
(
additional_parameter_list
=
None
):
ProcessManager
.
getSupportedParameterSet
=
patch_getSupportedParameterSet
ProcessManager
.
getSupportedParameterSet
=
patch_getSupportedParameterSet
...
@@ -388,7 +386,7 @@ branch = foo
...
@@ -388,7 +386,7 @@ branch = foo
runner
=
UnitTestRunner
(
test_node
)
runner
=
UnitTestRunner
(
test_node
)
runner
.
runTestSuite
(
node_test_suite
,
"http://foo.bar"
)
runner
.
runTestSuite
(
node_test_suite
,
"http://foo.bar"
)
expected_parameter_list
=
[
'%s/a/bin/runTestSuite'
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'
,
'dummy'
,
'--test_suite_title'
,
'Foo-Test'
,
'--node_quantity'
,
3
,
'--master_url'
,
'http://foo.bar'
]
'http://foo.bar'
]
if
additional_parameter_list
:
if
additional_parameter_list
:
...
@@ -504,11 +502,8 @@ branch = foo
...
@@ -504,11 +502,8 @@ branch = foo
TaskDistributor
.
startTestSuite
=
patch_startTestSuite
TaskDistributor
.
startTestSuite
=
patch_startTestSuite
original_createTestResult
=
TaskDistributionTool
.
createTestResult
original_createTestResult
=
TaskDistributionTool
.
createTestResult
TaskDistributionTool
.
createTestResult
=
patch_createTestResult
TaskDistributionTool
.
createTestResult
=
patch_createTestResult
test_node
=
self
.
getTestNode
()
test_node
=
self
.
getTestNode
()
test_node_slapos
=
SlapOSInstance
()
runner
=
UnitTestRunner
(
test_node
)
runner
=
UnitTestRunner
(
test_node
)
original_prepareSlapOS
=
runner
.
_prepareSlapOS
original_prepareSlapOS
=
runner
.
_prepareSlapOS
runner
.
_prepareSlapOS
=
doNothing
runner
.
_prepareSlapOS
=
doNothing
original_runTestSuite
=
runner
.
runTestSuite
original_runTestSuite
=
runner
.
runTestSuite
...
@@ -617,7 +612,7 @@ branch = foo
...
@@ -617,7 +612,7 @@ branch = foo
original_runTestSuite
=
runner
.
runTestSuite
original_runTestSuite
=
runner
.
runTestSuite
runner
.
runTestSuite
=
doNothing
runner
.
runTestSuite
=
doNothing
SlapOSControler
.
initializeSlapOSControler
=
doNothing
SlapOSControler
.
initializeSlapOSControler
=
doNothing
test_
node
.
run
()
runner
.
test
node
.
run
()
self
.
assertEquals
(
counter
,
3
)
self
.
assertEquals
(
counter
,
3
)
checkTestSuite
(
test_node
)
checkTestSuite
(
test_node
)
time
.
sleep
=
original_sleep
time
.
sleep
=
original_sleep
...
...
erp5/util/testnode/NodeTestSuite.py
View file @
8456c7c8
...
@@ -43,7 +43,10 @@ from Updater import Updater
...
@@ -43,7 +43,10 @@ from Updater import Updater
from
erp5.util
import
taskdistribution
from
erp5.util
import
taskdistribution
class
SlapOSInstance
(
object
):
class
SlapOSInstance
(
object
):
"""
Base of an software instance,
store variables used during software installation
"""
def
__init__
(
self
):
def
__init__
(
self
):
self
.
retry_software_count
=
0
self
.
retry_software_count
=
0
self
.
retry
=
False
self
.
retry
=
False
...
@@ -57,7 +60,9 @@ class SlapOSInstance(object):
...
@@ -57,7 +60,9 @@ class SlapOSInstance(object):
class
NodeTestSuite
(
SlapOSInstance
):
class
NodeTestSuite
(
SlapOSInstance
):
"""
"""
def
__init__
(
self
,
reference
):
def
__init__
(
self
,
reference
):
super
(
NodeTestSuite
,
self
).
__init__
()
super
(
NodeTestSuite
,
self
).
__init__
()
self
.
reference
=
reference
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