slaprunner resiliencytest: simplify __init__.

parent 64055fb1
...@@ -48,7 +48,7 @@ class ResiliencyTestSuite(object): ...@@ -48,7 +48,7 @@ class ResiliencyTestSuite(object):
computer_id, partition_id, software, computer_id, partition_id, software,
namebase, namebase,
root_instance_name, root_instance_name,
sleep_time_between_test=600, sleep_time_between_test=900,
total_instance_count="2", total_instance_count="2",
type=None): type=None):
self.server_url = server_url self.server_url = server_url
......
...@@ -45,26 +45,14 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -45,26 +45,14 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
Run Slaprunner Resiliency Test. Run Slaprunner Resiliency Test.
It is highly suggested to read ResiliencyTestSuite code. It is highly suggested to read ResiliencyTestSuite code.
""" """
def __init__(self, def __init__(self, *args, **kwargs):
server_url, key_file, cert_file,
computer_id, partition_id, software,
namebase, slaprunner_rootinstance_name,
total_instance_count="3"):
# Setup urllib2 with cookie support # Setup urllib2 with cookie support
cookie_jar = cookielib.CookieJar() cookie_jar = cookielib.CookieJar()
self._opener_director = urllib2.build_opener( self._opener_director = urllib2.build_opener(
urllib2.HTTPCookieProcessor(cookie_jar) urllib2.HTTPCookieProcessor(cookie_jar)
) )
ResiliencyTestSuite.__init__( ResiliencyTestSuite.__init__(self, *args, **kwargs)
self,
server_url, key_file, cert_file,
computer_id, partition_id, software,
namebase,
slaprunner_rootinstance_name,
1000
)
def _getPartitionParameterDict(self): def _getPartitionParameterDict(self):
""" """
...@@ -202,7 +190,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -202,7 +190,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
#XXX-Nicolas: hardcoded url. Best way right now to automate the tests... #XXX-Nicolas: hardcoded url. Best way right now to automate the tests...
monitoring_password = "passwordtochange" monitoring_password = "passwordtochange"
monitor_url = self.monitor_url + "?script=zero-knowledge%2Fsettings.cgi" monitor_url = self.monitor_url + "?script=zero-knowledge%2Fsettings.cgi"
result = self._opener_director.open(monitor_url, result = self._opener_director.open(monitor_url,
"password=" + monitoring_password + ";password_2=" + monitoring_password) "password=" + monitoring_password + ";password_2=" + monitoring_password)
if result.getcode() is not 200: if result.getcode() is not 200:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment