Exemple #1
0
 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()))
Exemple #2
0
 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())
Exemple #4
0
 def setUp(self):
     """
     Set up for testing osd.objectServer.objectutils.TranscationManager
     """
     self.logger = debug_logger()
     self.http_comm = TranscationManager(self.logger)
Exemple #5
0
 def setUp(self):
     """
     Set up for testing osd.objectServer.objectutils
     """
     self.logger = debug_logger()
     self.lock_obj = LockManager(self.logger)
Exemple #6
0
 def test_get_fs_list(self):
     self.assertEquals(ring.get_fs_list(debug_logger()), [
         'fs1', 'fs2', 'fs3', 'fs4', 'fs5', 'fs6', 'fs7', 'fs8', 'fs9',
         'fs10'
     ])
Exemple #7
0
 def setUp(self):
     self.account_ring_obj = ring.AccountRing(OSD_DIR, debug_logger())
Exemple #8
0
 def setUp(self):
     self.container_ring_obj = ring.ContainerRing(OSD_DIR, debug_logger())
Exemple #9
0
 def setUp(self):
     self.object_ring_obj = ring.ObjectRing(OSD_DIR, debug_logger())
Exemple #10
0
 def setUp(self):
     self.ring_data_obj = ring.RingData(OSD_DIR, debug_logger())