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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
c930c553
Commit
c930c553
authored
Dec 02, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5.util: Remove trailing whitespaces
...in testERP5TestNode.
parent
d3bc4c7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
20 deletions
+19
-20
CHANGES.erp5.util.txt
CHANGES.erp5.util.txt
+2
-3
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+17
-17
No files found.
CHANGES.erp5.util.txt
View file @
c930c553
Changes
=======
0.4.40 (2014-07-30)
-------------------
...
...
@@ -242,7 +241,7 @@ Changes
* erp5.util.testnode:
- Fixed several issues introduced by the management of test
suite by the master [Sebastien Robin]
suite by the master [Sebastien Robin]
0.4.11 (2012-10-22)
-------------------
...
...
@@ -250,7 +249,7 @@ Changes
* erp5.util.testnode:
- Take test suite parameters from the master, to allow distribution
of the work by the master [Pere Cortes], [Sebastien Robin]
of the work by the master [Pere Cortes], [Sebastien Robin]
0.4.10 (2012-10-01)
-------------------
...
...
erp5/tests/testERP5TestNode.py
View file @
c930c553
...
...
@@ -86,7 +86,7 @@ class ERP5TestNode(TestCase):
config
[
"server_url"
]
=
"http://foo.bar"
config
[
"httpd_ip"
]
=
"ff:ff:ff:ff:ff:ff:ff:ff"
config
[
"httpd_software_access_port"
]
=
"9080"
return
TestNode
(
self
.
log
,
config
)
def
getTestSuiteData
(
self
,
add_third_repository
=
False
,
reference
=
"foo"
):
...
...
@@ -213,7 +213,7 @@ class ERP5TestNode(TestCase):
def
test_04_constructProfile
(
self
,
my_test_type
=
'UnitTest'
):
"""
Check if the software profile is correctly generated
"""
"""
test_node
=
self
.
getTestNode
()
test_node
.
test_suite_portal
=
TaskDistributor
test_node
.
test_suite_portal
.
getTestNode
=
TaskDistributor
.
getTestType
...
...
@@ -437,16 +437,16 @@ ignore-ssl-certificate = true
os
.
makedirs
(
path_to_create
)
return
os
.
close
(
os
.
open
(
os
.
path
.
join
(
path_to_create
,
end_path
),
os
.
O_CREAT
))
def
get_parameters
(
self
,
*
args
,
**
kw
):
call_parameter_list
.
append
({
'args'
:
[
x
for
x
in
args
],
'kw'
:
kw
})
def
patch_getSupportedParameterSet
(
self
,
run_test_suite_path
,
parameter_list
,):
if
'--firefox_bin'
and
'--xvfb_bin'
in
parameter_list
:
return
set
([
'--firefox_bin'
,
'--xvfb_bin'
])
else
:
return
[]
test_node
=
self
.
getTestNode
()
RunnerClass
=
self
.
returnGoodClassRunner
(
my_test_type
)
runner
=
RunnerClass
(
test_node
)
...
...
@@ -507,7 +507,7 @@ ignore-ssl-certificate = true
"args"
:
[
x
for
x
in
args
],
"kw"
:
kw
})
return
{
"status_code"
:
self
.
status_code
}
SlapOSControler
.
initializeSlapOSControler
=
Patch
(
"initializeSlapOSControler"
)
SlapOSControler
.
runSoftwareRelease
=
Patch
(
"runSoftwareRelease"
)
SlapOSControler
.
runComputerPartition
=
Patch
(
"runComputerPartition"
)
...
...
@@ -551,7 +551,7 @@ ignore-ssl-certificate = true
def
patch_isHostingSubscriptionReady
(
self
,
*
args
,
**
kw
):
return
True
def
patch_isRegisteredHostingSubscription
(
self
,
*
args
,
**
kw
):
return
True
return
True
test_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
os
.
makedirs
(
test_result_path_root
)
...
...
@@ -566,7 +566,7 @@ ignore-ssl-certificate = true
raise
StopIteration
counter
+=
1
return
json
.
dumps
([])
def
_checkExistingTestSuite
(
reference_set
):
test_self
.
assertEquals
(
set
(
reference_set
),
set
(
os
.
listdir
(
test_node
.
working_directory
)))
...
...
@@ -644,8 +644,8 @@ ignore-ssl-certificate = true
TaskDistributionTool
.
createTestResult
=
patch_createTestResult
# TestNode
test_node
=
self
.
getTestNode
()
# Modify class UnitTestRunner(or more after) method
test_node
=
self
.
getTestNode
()
# Modify class UnitTestRunner(or more after) method
original_prepareSlapOS
=
RunnerClass
.
_prepareSlapOS
original_runTestSuite
=
RunnerClass
.
runTestSuite
RunnerClass
.
_prepareSlapOS
=
doNothing
...
...
@@ -735,7 +735,7 @@ ignore-ssl-certificate = true
def
patch_isHostingSubscriptionReady
(
self
,
*
args
,
**
kw
):
return
True
def
patch_isRegisteredHostingSubscription
(
self
,
*
args
,
**
kw
):
return
True
return
True
test_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
os
.
makedirs
(
test_result_path_root
)
...
...
@@ -821,7 +821,7 @@ ignore-ssl-certificate = true
original_prepareSlapOS
=
RunnerClass
.
_prepareSlapOS
original_runTestSuite
=
RunnerClass
.
runTestSuite
if
my_test_type
==
"ScalabilityTest"
:
RunnerClass
.
runTestSuite
=
patch_runTestSuite
else
:
...
...
@@ -906,7 +906,7 @@ ignore-ssl-certificate = true
initial_runSoftwareRelease
=
SlapOSControler
.
runSoftwareRelease
test_node
=
self
.
getTestNode
()
RunnerClass
=
self
.
returnGoodClassRunner
(
my_test_type
)
runner
=
RunnerClass
(
test_node
)
runner
=
RunnerClass
(
test_node
)
node_test_suite
=
test_node
.
getNodeTestSuite
(
'foo'
)
init_call_kw_list
=
[]
def
initializeSlapOSControler
(
self
,
**
kw
):
...
...
@@ -920,7 +920,7 @@ ignore-ssl-certificate = true
test_node
.
log
,
create_partition
=
0
)
def
callRaisingPrepareSlapos
():
self
.
assertRaises
(
SubprocessError
,
callPrepareSlapOS
)
self
.
assertEquals
(
node_test_suite
.
retry_software_count
,
0
)
for
x
in
xrange
(
0
,
11
):
callRaisingPrepareSlapos
()
...
...
@@ -1008,7 +1008,7 @@ ignore-ssl-certificate = true
def
patch_isHostingSubscriptionReady
(
self
,
*
args
,
**
kw
):
return
True
def
patch_isRegisteredHostingSubscription
(
self
,
*
args
,
**
kw
):
return
True
return
True
def
patch_runTestSuite
(
self
,
*
args
,
**
kw
):
return
{
'status_code'
:
0
}
test_self
=
self
...
...
@@ -1048,7 +1048,7 @@ ignore-ssl-certificate = true
TaskDistributor
.
isMasterTestnode
=
patch_isMasterTestnode
TaskDistributor
.
startTestSuite
=
patch_startTestSuite
TaskDistributor
.
subscribeNode
=
doNothing
TaskDistributor
.
getTestType
=
patch_getTestType
TaskDistributor
.
getTestType
=
patch_getTestType
TaskDistributionTool
.
createTestResult
=
patch_createTestResult
RunnerClass
.
_prepareSlapOS
=
doNothing
RunnerClass
.
runTestSuite
=
patch_runTestSuite
...
...
@@ -1059,7 +1059,7 @@ ignore-ssl-certificate = true
SlapOSMasterCommunicator
.
isRegisteredHostingSubscription
=
patch_isRegisteredHostingSubscription
SlapOSMasterCommunicator
.
__init__
=
doNothing
# Run
test_node
=
self
.
getTestNode
()
test_node
=
self
.
getTestNode
()
test_node
.
run
()
# Restore methods
TaskDistributor
.
getSlaposAccountKey
=
original_getSlaposAccountKey
...
...
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