def setUp(self): super(FibreChannelConnectorTestCase, self).setUp() self.connector = connector.FibreChannelConnector( None, execute=self.fake_execute, use_multipath=False) self.assertIsNotNone(self.connector) self.assertIsNotNone(self.connector._linuxfc) self.assertIsNotNone(self.connector._linuxscsi)
def test_brick_get_connector(self): root_helper = utils.get_root_helper() self.mox.StubOutClassWithMocks(connector, 'ISCSIConnector') connector.ISCSIConnector(execute=putils.execute, driver=None, root_helper=root_helper, use_multipath=False) self.mox.StubOutClassWithMocks(connector, 'FibreChannelConnector') connector.FibreChannelConnector(execute=putils.execute, driver=None, root_helper=root_helper, use_multipath=False) self.mox.StubOutClassWithMocks(connector, 'AoEConnector') connector.AoEConnector(execute=putils.execute, driver=None, root_helper=root_helper) self.mox.ReplayAll() utils.brick_get_connector('iscsi') utils.brick_get_connector('fibre_channel') utils.brick_get_connector('aoe') self.mox.VerifyAll()