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
Lukas Niegsch
erp5
Commits
66d7df28
Commit
66d7df28
authored
May 19, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: fix indentation and whitespaces in test
parent
31a4cf96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+8
-8
No files found.
erp5/tests/testERP5TestNode.py
View file @
66d7df28
...
@@ -743,7 +743,7 @@ shared = true
...
@@ -743,7 +743,7 @@ shared = true
def
test_11_run
(
self
,
my_test_type
=
'UnitTest'
,
grade
=
'master'
):
def
test_11_run
(
self
,
my_test_type
=
'UnitTest'
,
grade
=
'master'
):
def
doNothing
(
self
,
*
args
,
**
kw
):
def
doNothing
(
self
,
*
args
,
**
kw
):
pass
pass
# Used in case of 'ScalabilityTest'
# Used in case of 'ScalabilityTest'
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
return
my_test_type
return
my_test_type
...
@@ -813,7 +813,7 @@ shared = true
...
@@ -813,7 +813,7 @@ shared = true
return
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
return
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
logger
,
test_result_path
,
node_title
,
revision
)
logger
,
test_result_path
,
node_title
,
revision
)
def
patch_runTestSuite
(
self
,
*
argv
,
**
kw
):
def
patch_runTestSuite
(
self
,
*
argv
,
**
kw
):
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
original_sleep
=
time
.
sleep
original_sleep
=
time
.
sleep
time
.
sleep
=
doNothing
time
.
sleep
=
doNothing
self
.
generateTestRepositoryList
()
self
.
generateTestRepositoryList
()
...
@@ -851,7 +851,7 @@ shared = true
...
@@ -851,7 +851,7 @@ shared = true
test_node
=
self
.
getTestNode
()
test_node
=
self
.
getTestNode
()
# Modify class UnitTestRunner(or more after) method
# Modify class UnitTestRunner(or more after) method
def
patch_prepareSlapOS
(
*
args
,
**
kw
):
def
patch_prepareSlapOS
(
*
args
,
**
kw
):
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
original_prepareSlapOS
=
RunnerClass
.
_prepareSlapOS
original_prepareSlapOS
=
RunnerClass
.
_prepareSlapOS
original_runTestSuite
=
RunnerClass
.
runTestSuite
original_runTestSuite
=
RunnerClass
.
runTestSuite
RunnerClass
.
_prepareSlapOS
=
patch_prepareSlapOS
RunnerClass
.
_prepareSlapOS
=
patch_prepareSlapOS
...
@@ -955,7 +955,7 @@ shared = true
...
@@ -955,7 +955,7 @@ shared = true
return
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
return
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
logger
,
test_result_path
,
node_title
,
revision
)
logger
,
test_result_path
,
node_title
,
revision
)
def
patch_runTestSuite
(
self
,
*
argv
,
**
kw
):
def
patch_runTestSuite
(
self
,
*
argv
,
**
kw
):
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
def
checkTestSuite
(
test_node
):
def
checkTestSuite
(
test_node
):
test_node
.
node_test_suite_dict
test_node
.
node_test_suite_dict
rand_part_set
=
set
()
rand_part_set
=
set
()
...
@@ -1019,7 +1019,7 @@ shared = true
...
@@ -1019,7 +1019,7 @@ shared = true
RunnerClass
.
runTestSuite
=
doNothing
RunnerClass
.
runTestSuite
=
doNothing
def
patch_prepareSlapOS
(
*
args
,
**
kw
):
def
patch_prepareSlapOS
(
*
args
,
**
kw
):
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
RunnerClass
.
_prepareSlapOS
=
patch_prepareSlapOS
RunnerClass
.
_prepareSlapOS
=
patch_prepareSlapOS
SlapOSControler
.
initializeSlapOSControler
=
doNothing
SlapOSControler
.
initializeSlapOSControler
=
doNothing
test_node
.
run
()
test_node
.
run
()
...
@@ -1188,11 +1188,11 @@ shared = true
...
@@ -1188,11 +1188,11 @@ shared = true
def
patch_isMasterTestnode
(
self
,
*
args
,
**
kw
):
def
patch_isMasterTestnode
(
self
,
*
args
,
**
kw
):
return
True
return
True
def
patch_generateConfiguration
(
self
,
*
args
,
**
kw
):
def
patch_generateConfiguration
(
self
,
*
args
,
**
kw
):
return
json
.
dumps
({
"configuration_list"
:
[{
"ok"
:
"ok"
}],
"involved_nodes_computer_guid"
\
return
json
.
dumps
({
"configuration_list"
:
[{
"ok"
:
"ok"
}],
"involved_nodes_computer_guid"
\
:
[
"COMP1"
,
"COMP2"
,
"COMP3"
],
"error_message"
:
"No error."
,
"launcher_nodes_computer_guid"
:
[
"COMP1"
],
\
:
[
"COMP1"
,
"COMP2"
,
"COMP3"
],
"error_message"
:
"No error."
,
"launcher_nodes_computer_guid"
:
[
"COMP1"
],
\
"launchable"
:
True
,
"randomized_path"
:
"azertyuiop"
})
"launchable"
:
True
,
"randomized_path"
:
"azertyuiop"
})
def
doNothing
(
self
,
*
args
,
**
kw
):
def
doNothing
(
self
,
*
args
,
**
kw
):
pass
pass
def
patch_getSlaposAccountKey
(
self
,
*
args
,
**
kw
):
def
patch_getSlaposAccountKey
(
self
,
*
args
,
**
kw
):
return
"key"
return
"key"
def
patch_getSlaposAccountCertificate
(
self
,
*
args
,
**
kw
):
def
patch_getSlaposAccountCertificate
(
self
,
*
args
,
**
kw
):
...
@@ -1204,7 +1204,7 @@ shared = true
...
@@ -1204,7 +1204,7 @@ shared = true
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
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
):
def
patch_generateProfilePasswordAccess
(
self
,
*
args
,
**
kw
):
return
"user"
,
"pass"
return
"user"
,
"pass"
def
patch_getDictionaryFromFile
(
self
,
*
args
,
**
kw
):
def
patch_getDictionaryFromFile
(
self
,
*
args
,
**
kw
):
...
...
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