Commit 26c75815 authored by Xavier Thompson's avatar Xavier Thompson

software/theia: Fix EPR5 resiliency test

Now that `slapos request` understands `json-in-xml` serialisation and
automatically unwraps the instance connexion parameters when printing
them, we need to adapt how the ERP5 test parses that output.
parent 8ae52559
...@@ -60,7 +60,7 @@ def setUpModule(): ...@@ -60,7 +60,7 @@ def setUpModule():
class ERP5Mixin(object): class ERP5Mixin(object):
_test_software_url = erp5_software_release_url _test_software_url = erp5_software_release_url
_connexion_parameters_regex = re.compile(r"{\s*'_'\s*:\s*'(.*)'\s*}") _connexion_parameters_regex = re.compile(r"{.*}", re.DOTALL)
def _getERP5ConnexionParameters(self, software_type='export'): def _getERP5ConnexionParameters(self, software_type='export'):
slapos = self._getSlapos(software_type) slapos = self._getSlapos(software_type)
...@@ -69,7 +69,7 @@ class ERP5Mixin(object): ...@@ -69,7 +69,7 @@ class ERP5Mixin(object):
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
) )
print(out) print(out)
return json.loads(self._connexion_parameters_regex.search(out).group(1)) return json.loads(self._connexion_parameters_regex.search(out).group(0).replace("'", '"'))
def _getERP5Url(self, connexion_parameters, path=''): def _getERP5Url(self, connexion_parameters, path=''):
return urljoin(connexion_parameters['family-default-v6'], path) return urljoin(connexion_parameters['family-default-v6'], path)
......
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