Commit 14dda8ea authored by Sebastien Robin's avatar Sebastien Robin

test_result: allow to define slapos parameters in test suites (part 2)

parent cf657fc4
...@@ -385,9 +385,9 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -385,9 +385,9 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
test_suite = self._getTestSuiteFromTitle(test_suite_title) test_suite = self._getTestSuiteFromTitle(test_suite_title)
cluster_configuration = test_suite.getClusterConfiguration() or '{}' cluster_configuration = test_suite.getClusterConfiguration() or '{}'
try: try:
generated_configuration = [json.loads(cluster_configuration)] generated_configuration = {"configuration_list": [json.loads(cluster_configuration)]}
except ValueError: except ValueError:
generated_configuration = [{}] generated_configuration = {"configuration_list": [{}]}
if batch_mode: if batch_mode:
return generated_configuration return generated_configuration
return json.dumps(generated_configuration) return json.dumps(generated_configuration)
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