"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py" between
manila-8.1.3.tar.gz and manila-8.1.4.tar.gz

About: OpenStack Manila provides “Shared Filesystems as a service”.
The "Stein" series (maintained release).

test_client_cmode.py  (manila-8.1.3):test_client_cmode.py  (manila-8.1.4)
skipping to change at line 2726 skipping to change at line 2726
self.assertEqual(1, client_cmode.LOG.error.call_count) self.assertEqual(1, client_cmode.LOG.error.call_count)
def test_configure_dns_api_error(self): def test_configure_dns_api_error(self):
self.mock_object(self.client, 'send_request', self._mock_api_error()) self.mock_object(self.client, 'send_request', self._mock_api_error())
self.assertRaises(exception.NetAppException, self.assertRaises(exception.NetAppException,
self.client.configure_dns, self.client.configure_dns,
fake.KERBEROS_SECURITY_SERVICE) fake.KERBEROS_SECURITY_SERVICE)
@ddt.data('', '10.0.0.1', ['10.0.0.2', '10.0.0.3']) @ddt.data(
def test_set_preferred_dc(self, server): {
'server': '',
'check_feature': False
},
{
'server': ['10.0.0.2', '10.0.0.3'],
'check_feature': False
},
{
'server': '10.0.0.1',
'check_feature': False
},
{
'server': '10.0.0.1',
'check_feature': True
}
)
@ddt.unpack
def test_set_preferred_dc(self, server, check_feature):
if check_feature:
self.client.features.add_feature('CIFS_DC_ADD_SKIP_CHECK')
self.mock_object(self.client, 'send_request') self.mock_object(self.client, 'send_request')
security_service = copy.deepcopy(fake.CIFS_SECURITY_SERVICE) security_service = copy.deepcopy(fake.CIFS_SECURITY_SERVICE)
security_service['server'] = ', '.join(server) security_service['server'] = ', '.join(server)
self.client.set_preferred_dc(security_service) self.client.set_preferred_dc(security_service)
if server is '': if server is '':
self.client.send_request.assert_not_called() self.client.send_request.assert_not_called()
else: else:
preferred_dc_add_args = { preferred_dc_add_args = {
'domain': fake.CIFS_SECURITY_SERVICE['domain'], 'domain': fake.CIFS_SECURITY_SERVICE['domain'],
'preferred-dc': [{'string': dc_ip} for dc_ip in server] 'preferred-dc': [{'string': dc_ip} for dc_ip in server]
} }
if check_feature:
preferred_dc_add_args['skip-config-validation'] = 'false'
self.client.send_request.assert_has_calls([ self.client.send_request.assert_has_calls([
mock.call('cifs-domain-preferred-dc-add', mock.call('cifs-domain-preferred-dc-add',
preferred_dc_add_args)]) preferred_dc_add_args)])
def test_set_preferred_dc_api_error(self): def test_set_preferred_dc_api_error(self):
self.mock_object(self.client, 'send_request', self._mock_api_error()) self.mock_object(self.client, 'send_request', self._mock_api_error())
security_service = copy.deepcopy(fake.CIFS_SECURITY_SERVICE) security_service = copy.deepcopy(fake.CIFS_SECURITY_SERVICE)
security_service['server'] = 'fake_server' security_service['server'] = 'fake_server'
 End of changes. 2 change blocks. 
2 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)