예제 #1
0
 def test_get_volume_paths(self, mock_rados, mock_rbd):
     rbd_connector = rbd.RBDConnector(None)
     expected = []
     actual = rbd_connector.get_volume_paths(self.connection_properties)
     self.assertEqual(expected, actual)
예제 #2
0
 def test_get_search_path(self):
     rbd_connector = rbd.RBDConnector(None)
     path = rbd_connector.get_search_path()
     self.assertIsNone(path)
예제 #3
0
 def test_sanitize_mon_host(self, hosts_in, hosts_out):
     conn = rbd.RBDConnector(None)
     self.assertEqual(hosts_out, conn._sanitize_mon_hosts(hosts_in))
예제 #4
0
 def test_extend_volume(self):
     rbd_connector = rbd.RBDConnector(None)
     self.assertRaises(NotImplementedError,
                       rbd_connector.extend_volume,
                       self.connection_properties)
예제 #5
0
파일: test_rbd.py 프로젝트: dr4Ke/os-brick
 def test_connect_volume_local(self, mock_local_attach):
     connector = rbd.RBDConnector(None, do_local_attach=True)
     res = connector.connect_volume(self.connection_properties)
     mock_local_attach.assert_called_once_with(self.connection_properties)
     self.assertIs(mock_local_attach.return_value, res)