def test_all_service_id(self): self.assertEquals(ring.get_all_service_id("object", debug_logger()), obj_id) self.assertEquals(ring.get_all_service_id("container", debug_logger()), cont_id) self.assertEquals(ring.get_all_service_id("account", debug_logger()), acc_id) self.assertRaises(ValueError, ring.get_all_service_id, ("dummy"), (debug_logger()))
def test_get_ip_port_by_id(self): self.assertEquals( ring.get_ip_port_by_id("HN0101_61006_account", debug_logger()), { 'ip': '1.1.1.1', 'port': '11' }) self.assertEquals( ring.get_ip_port_by_id("HN0101_61007_container", debug_logger()), { 'ip': '1.1.1.1', 'port': '11' }) self.assertEquals( ring.get_ip_port_by_id("HN0101_61008_object", debug_logger()), { 'ip': '1.1.1.1', 'port': '11' })
def create_instance(self, conf, RecoveryHandler): return object_server.ObjectController(conf, logger=debug_logger())
def setUp(self): """ Set up for testing osd.objectServer.objectutils.TranscationManager """ self.logger = debug_logger() self.http_comm = TranscationManager(self.logger)
def setUp(self): """ Set up for testing osd.objectServer.objectutils """ self.logger = debug_logger() self.lock_obj = LockManager(self.logger)
def test_get_fs_list(self): self.assertEquals(ring.get_fs_list(debug_logger()), [ 'fs1', 'fs2', 'fs3', 'fs4', 'fs5', 'fs6', 'fs7', 'fs8', 'fs9', 'fs10' ])
def setUp(self): self.account_ring_obj = ring.AccountRing(OSD_DIR, debug_logger())
def setUp(self): self.container_ring_obj = ring.ContainerRing(OSD_DIR, debug_logger())
def setUp(self): self.object_ring_obj = ring.ObjectRing(OSD_DIR, debug_logger())
def setUp(self): self.ring_data_obj = ring.RingData(OSD_DIR, debug_logger())