Commit 3c03f12b authored by Nicolas Wavrant's avatar Nicolas Wavrant

resiliencytest: slaprunner: test passes basic auth even for clone

parent c5a822b3
...@@ -83,10 +83,8 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -83,10 +83,8 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
def _login(self): def _login(self):
self.logger.debug('Logging in...') self.logger.debug('Logging in...')
self._connectToSlaprunner('doLogin', data='clogin=%s&cpwd=%s' % ( b64string = base64.encodestring('%s:%s' % (self.slaprunner_user, self.slaprunner_password))[:-1]
self.slaprunner_user, self._opener_director.addheaders = [('Authorization', 'Basic %s'%b64string)]
self.slaprunner_password)
)
def _retrieveInstanceLogFile(self): def _retrieveInstanceLogFile(self):
""" """
...@@ -181,8 +179,6 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -181,8 +179,6 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
self.logger.debug('Getting the backend URL and recovery code...') self.logger.debug('Getting the backend URL and recovery code...')
parameter_dict = self._getPartitionParameterDict() parameter_dict = self._getPartitionParameterDict()
self.slaprunner_backend_url = parameter_dict['backend_url'] self.slaprunner_backend_url = parameter_dict['backend_url']
#XXX dirty but is used to delete /login from published backend_url
self.slaprunner_backend_url = self.slaprunner_backend_url[:-5]
self.logger.info('backend_url is %s.' % self.slaprunner_backend_url) self.logger.info('backend_url is %s.' % self.slaprunner_backend_url)
slaprunner_recovery_code = parameter_dict['password_recovery_code'] slaprunner_recovery_code = parameter_dict['password_recovery_code']
...@@ -196,9 +192,6 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -196,9 +192,6 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
) )
) )
b64string = base64.encodestring('%s:%s' % (self.slaprunner_user, self.slaprunner_password))[:-1]
self._opener_director.addheaders = [('Authorization', 'Basic %s'%b64string)]
self._login() self._login()
self._gitClone() self._gitClone()
......
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