'Test exception when the storage servers are invalid/missing.'

@mock.patch('pwd.getpwnam', return_value=1)
@mock.patch('grp.getgrnam', return_value=1)
@mock.patch('socket.gethostbyname', return_value='123.123.123.123')
def test_parameter_storageservers_invalid(self, mock_ghn, mock_grnam, mock_pwnam):

    self.driver.check_for_setup_error()
    self.configuration.hgst_storage_servers = ''
    self.assertRaises(exception.VolumeDriverException, self.driver.check_for_setup_error)
    self.configuration.hgst_storage_servers = 'stor1,stor2'
    self.assertRaises(exception.VolumeDriverException, self.driver.check_for_setup_error)
    self.configuration.hgst_storage_servers = 'stor1:gbd0,stor2'
    self.assertRaises(exception.VolumeDriverException, self.driver.check_for_setup_error)
    self.configuration.hgst_storage_servers = 'stor1:gbd0'
    self._fail_host_storage = True
    self.assertRaises(exception.VolumeDriverException, self.driver.check_for_setup_error)
