mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Merge pull request #15992 from rallytime/bp-15617
Backport #15617 to 2014.7
This commit is contained in:
commit
3fe53840c0
@ -37,9 +37,9 @@ class MdadmTestCase(TestCase):
|
|||||||
)
|
)
|
||||||
self.assertEqual('salt', ret)
|
self.assertEqual('salt', ret)
|
||||||
mock.assert_called_once_with(
|
mock.assert_called_once_with(
|
||||||
'mdadm -C /dev/md0 -v --chunk=256 --force -l 5 -n 3 '
|
['mdadm', '-C', '/dev/md0', '-v', '--chunk', 256, '--force',
|
||||||
'/dev/sdb1 /dev/sdc1 /dev/sdd1'
|
'-l', 5, '-e', 'default', '-n', 3, '/dev/sdb1', '/dev/sdc1',
|
||||||
)
|
'/dev/sdd1'], python_shell=False)
|
||||||
|
|
||||||
def test_create_test_mode(self):
|
def test_create_test_mode(self):
|
||||||
mock = MagicMock()
|
mock = MagicMock()
|
||||||
@ -53,8 +53,9 @@ class MdadmTestCase(TestCase):
|
|||||||
chunk=256,
|
chunk=256,
|
||||||
test_mode=True
|
test_mode=True
|
||||||
)
|
)
|
||||||
self.assertEqual('mdadm -C /dev/md0 -v --chunk=256 --force -l 5 -n 3 '
|
self.assertEqual(['mdadm', '-C', '/dev/md0', '-v', '--chunk', 256,
|
||||||
'/dev/sdb1 /dev/sdc1 /dev/sdd1', ret)
|
'--force', '-l', 5, '-e', 'default', '-n', 3,
|
||||||
|
'/dev/sdb1', '/dev/sdc1', '/dev/sdd1'], ret)
|
||||||
assert not mock.called, 'test mode failed, cmd.run called'
|
assert not mock.called, 'test mode failed, cmd.run called'
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user