Commit 36d8797c authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

slapos: Make test_object pass

parent 941896e5
...@@ -149,7 +149,6 @@ class MasterMixin(BasicMixin, unittest.TestCase): ...@@ -149,7 +149,6 @@ class MasterMixin(BasicMixin, unittest.TestCase):
self, self,
software_release_url, software_release_url,
partition_id=None, partition_id=None,
slap_computer_partition=None,
retention_delay=None, retention_delay=None,
partition_timeout=None, partition_timeout=None,
shared_part_list='', shared_part_list='',
...@@ -167,10 +166,18 @@ class MasterMixin(BasicMixin, unittest.TestCase): ...@@ -167,10 +166,18 @@ class MasterMixin(BasicMixin, unittest.TestCase):
if partition_id is None: if partition_id is None:
partition_id = 'mypartition' partition_id = 'mypartition'
if slap_computer_partition is None: software_instance = {
slap_computer_partition = SlapComputerPartition( "reference": partition_id,
computer_id='bidon', "compute_node_id": 'bidon',
partition_id=partition_id) "portal_type": "Software Instance",
"compute_partition_id": partition_id,
"state": "stopped",
"software_type": None,
"parameters": {},
"processing_timestamp": 0,
"ip_list": [],
"full_ip_list": [],
}
instance_path = os.path.join(self.instance_root, partition_id) instance_path = os.path.join(self.instance_root, partition_id)
os.mkdir(instance_path) os.mkdir(instance_path)
...@@ -186,7 +193,7 @@ class MasterMixin(BasicMixin, unittest.TestCase): ...@@ -186,7 +193,7 @@ class MasterMixin(BasicMixin, unittest.TestCase):
supervisord_partition_configuration_dir=supervisor_configuration_path, supervisord_partition_configuration_dir=supervisor_configuration_path,
supervisord_socket=svcbackend._getSupervisordSocketPath( supervisord_socket=svcbackend._getSupervisordSocketPath(
self.instance_root, logging.getLogger(self.id())), self.instance_root, logging.getLogger(self.id())),
computer_partition=slap_computer_partition, computer_partition=software_instance,
computer_id='bidon', computer_id='bidon',
partition_id=partition_id, partition_id=partition_id,
server_url='bidon', server_url='bidon',
......
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