Merge pull request #32423 from jtand/glusterfs_test_fix

Update glusterfs_test to be inline with #32312
This commit is contained in:
Nicole Thomas 2016-04-07 15:53:03 -06:00
commit 5bc8c326ce

View file

@ -727,7 +727,7 @@ class GlusterfsTestCase(TestCase):
ret = '1 bricks successfully added to the volume Newvolume1'
# volume does exist
mock = MagicMock(return_value={'bricks': {}})
mock = MagicMock(return_value={'Newvolume1': {'bricks': {}}})
with patch.object(glusterfs, 'info', mock):
mock = MagicMock(return_value=xml_command_success)
# ... and the added brick does not exist
@ -736,7 +736,7 @@ class GlusterfsTestCase(TestCase):
['bricks']), ret)
mock = MagicMock(
return_value={'bricks': {'brick1': {'path': 'bricks'}}})
return_value={'Newvolume1': {'bricks': {'brick1': {'path': 'bricks'}}}})
with patch.object(glusterfs, 'info', mock):
# ... and the added brick does exist
with patch.dict(glusterfs.__salt__, {'cmd.run': mock}):