Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Laurent S
erp5
Commits
40eae5e7
Commit
40eae5e7
authored
Apr 18, 2018
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: update unittests corresponding to scalability testing
parent
3a11949f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+26
-0
No files found.
erp5/tests/testERP5TestNode.py
View file @
40eae5e7
...
@@ -88,6 +88,8 @@ class ERP5TestNode(TestCase):
...
@@ -88,6 +88,8 @@ class ERP5TestNode(TestCase):
config
[
"httpd_software_access_port"
]
=
"9080"
config
[
"httpd_software_access_port"
]
=
"9080"
config
[
"frontend_url"
]
=
"http://frontend/"
config
[
"frontend_url"
]
=
"http://frontend/"
config
[
"software_list"
]
=
[
"foo"
,
"bar"
]
config
[
"software_list"
]
=
[
"foo"
,
"bar"
]
config
[
"slapos_binary"
]
=
"/opt/slapgrid/HASH/bin/slapos"
config
[
"srv_directory"
]
=
"srv_directory"
testnode
=
TestNode
(
config
)
testnode
=
TestNode
(
config
)
# By default, keep suite logs to stdout for easier debugging
# By default, keep suite logs to stdout for easier debugging
...
@@ -1028,6 +1030,12 @@ shared = true
...
@@ -1028,6 +1030,12 @@ shared = true
return
"ScalabilityTest"
return
"ScalabilityTest"
def
patch_runTestSuite
(
self
,
*
args
,
**
kw
):
def
patch_runTestSuite
(
self
,
*
args
,
**
kw
):
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
def
patch_generateProfilePasswordAccess
(
self
,
*
args
,
**
kw
):
return
"user"
,
"pass"
def
patch_prepareFrontendMasterInstance
(
self
,
*
args
,
**
kw
):
return
"dummy_instance_guid"
def
patch_getDictionaryFromFile
(
self
,
*
args
,
**
kw
):
return
[]
test_self
=
self
test_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
os
.
makedirs
(
test_result_path_root
)
os
.
makedirs
(
test_result_path_root
)
...
@@ -1052,6 +1060,12 @@ shared = true
...
@@ -1052,6 +1060,12 @@ shared = true
original_request
=
SlapOSControler
.
request
original_request
=
SlapOSControler
.
request
original_updateInstanceXML
=
SlapOSControler
.
updateInstanceXML
original_updateInstanceXML
=
SlapOSControler
.
updateInstanceXML
original_SlapOSMasterCommunicator__init__
=
SlapOSMasterCommunicator
.
__init__
original_SlapOSMasterCommunicator__init__
=
SlapOSMasterCommunicator
.
__init__
original_generateProfilePasswordAccess
=
RunnerClass
.
generateProfilePasswordAccess
original_prepareFrontendMasterInstance
=
RunnerClass
.
prepareFrontendMasterInstance
original_getDictionaryFromFile
=
RunnerClass
.
getDictionaryFromFile
original_updateDictionaryFile
=
RunnerClass
.
updateDictionaryFile
original__createInstance
=
RunnerClass
.
_createInstance
original__waitInstanceCreation
=
RunnerClass
.
_waitInstanceCreation
time
.
sleep
=
doNothing
time
.
sleep
=
doNothing
TaskDistributor
.
getSlaposAccountKey
=
patch_getSlaposAccountKey
TaskDistributor
.
getSlaposAccountKey
=
patch_getSlaposAccountKey
...
@@ -1070,6 +1084,12 @@ shared = true
...
@@ -1070,6 +1084,12 @@ shared = true
SlapOSControler
.
request
=
doNothing
SlapOSControler
.
request
=
doNothing
SlapOSControler
.
updateInstanceXML
=
doNothing
SlapOSControler
.
updateInstanceXML
=
doNothing
SlapOSMasterCommunicator
.
__init__
=
doNothing
SlapOSMasterCommunicator
.
__init__
=
doNothing
RunnerClass
.
generateProfilePasswordAccess
=
patch_generateProfilePasswordAccess
RunnerClass
.
prepareFrontendMasterInstance
=
patch_prepareFrontendMasterInstance
RunnerClass
.
updateDictionaryFile
=
doNothing
RunnerClass
.
getDictionaryFromFile
=
patch_getDictionaryFromFile
RunnerClass
.
_createInstance
=
doNothing
RunnerClass
.
_waitInstanceCreation
=
doNothing
# Run
# Run
test_node
=
self
.
getTestNode
()
test_node
=
self
.
getTestNode
()
test_node
.
run
()
test_node
.
run
()
...
@@ -1091,3 +1111,9 @@ shared = true
...
@@ -1091,3 +1111,9 @@ shared = true
SlapOSControler
.
updateInstanceXML
=
original_updateInstanceXML
SlapOSControler
.
updateInstanceXML
=
original_updateInstanceXML
SlapOSMasterCommunicator
.
__init__
=
original_SlapOSMasterCommunicator__init__
SlapOSMasterCommunicator
.
__init__
=
original_SlapOSMasterCommunicator__init__
time
.
sleep
=
original_sleep
time
.
sleep
=
original_sleep
RunnerClass
.
generateProfilePasswordAccess
=
original_generateProfilePasswordAccess
RunnerClass
.
prepareFrontendMasterInstance
=
original_prepareFrontendMasterInstance
RunnerClass
.
getDictionaryFromFile
=
original_getDictionaryFromFile
RunnerClass
.
updateDictionaryFile
=
original_updateDictionaryFile
RunnerClass
.
_createInstance
=
original__createInstance
RunnerClass
.
_waitInstanceCreation
=
original__waitInstanceCreation
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