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
amrani
erp5
Commits
9cbd5218
Commit
9cbd5218
authored
Jul 17, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: ScalabilityTestRunner: Use SlapOSMasterCommunicator
parent
d068e001
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+13
-6
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
9cbd5218
...
...
@@ -42,6 +42,7 @@ from ProcessManager import SubprocessError, ProcessManager, CancellationError
from
subprocess
import
CalledProcessError
from
Updater
import
Updater
from
erp5.util
import
taskdistribution
from
erp5.util.testnode
import
SlapOSMasterCommunicator
# for dummy slapos answer
import
signal
...
...
@@ -60,7 +61,8 @@ class ScalabilityTestRunner():
certificate
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountCertificate
()
self
.
slapos_controler
.
createSlaposConfigurationFileAccount
(
key
,
certificate
,
self
.
testnode
.
config
)
self
.
slapos_communicator
=
SlapOSMasterCommunicator
(
key
,
certificate
,
'https://rest.slapos.org/Base_getHateoasMaster'
)
self
.
remaining_software_installation_dict
=
{}
# Protection to prevent installation of softwares after checking
...
...
@@ -178,7 +180,8 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
"""
# TODO : implement -> communication with SlapOS master
# this simulate a SlapOS answer
return
self
.
simulateSlapOSAnswer
()
#return self.simulateSlapOSAnswer()
return
self
.
slapos_communicator
.
isInstanceCorrectly
(
instance_title
,
'started'
)
def
remainSoftwareToInstall
(
self
):
"""
...
...
@@ -300,7 +303,8 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
self
.
_createInstance
(
self
.
reachable_profile
,
configuration_list
[
0
],
self
.
instance_title
,
node_test_suite
.
test_result
,
node_test_suite
.
test_suite
)
self
.
log
(
"Waiting for instance creation.."
)
self
.
_waitInstance
(
self
.
instance_title
)
#self._waitInstance(self.instance_title)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
self
.
instance_title
,
'started'
)
self
.
log
(
"Scalability instance requested"
)
""" except:
self.log("Unable to launch instance")
...
...
@@ -329,18 +333,21 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
slapos_controler
.
stopInstance
(
self
.
instance_title
)
self
.
log
(
"Waiting for instance stop.."
)
self
.
_waitInstance
(
self
.
instance_title
)
#self._waitInstance(self.instance_title)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
instance_title
,
'stopped'
)
# Update instance XML configuration
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
_updateInstanceXML
(
configuration
,
self
.
instance_title
,
node_test_suite
.
test_result
,
node_test_suite
.
test_suite
)
self
.
log
(
"Waiting for XML updating instance ready.."
)
self
.
_waitInstance
(
self
.
instance_title
)
#self._waitInstance(self.instance_title)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
instance_title
,
'started'
)
# Start instance
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
slapos_controler
.
startInstance
(
self
.
instance_title
)
self
.
log
(
"Waiting for instance start.."
)
self
.
_waitInstance
(
self
.
instance_title
)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
instance_title
,
'started'
)
#self._waitInstance(self.instance_title)
# Start only the current test
exclude_list
=
[
x
for
x
in
test_list
if
x
!=
test_list
[
count
]]
...
...
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