mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 08:35:21 +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)
|
||||
mock.assert_called_once_with(
|
||||
'mdadm -C /dev/md0 -v --chunk=256 --force -l 5 -n 3 '
|
||||
'/dev/sdb1 /dev/sdc1 /dev/sdd1'
|
||||
)
|
||||
['mdadm', '-C', '/dev/md0', '-v', '--chunk', 256, '--force',
|
||||
'-l', 5, '-e', 'default', '-n', 3, '/dev/sdb1', '/dev/sdc1',
|
||||
'/dev/sdd1'], python_shell=False)
|
||||
|
||||
def test_create_test_mode(self):
|
||||
mock = MagicMock()
|
||||
@ -53,8 +53,9 @@ class MdadmTestCase(TestCase):
|
||||
chunk=256,
|
||||
test_mode=True
|
||||
)
|
||||
self.assertEqual('mdadm -C /dev/md0 -v --chunk=256 --force -l 5 -n 3 '
|
||||
'/dev/sdb1 /dev/sdc1 /dev/sdd1', ret)
|
||||
self.assertEqual(['mdadm', '-C', '/dev/md0', '-v', '--chunk', 256,
|
||||
'--force', '-l', 5, '-e', 'default', '-n', 3,
|
||||
'/dev/sdb1', '/dev/sdc1', '/dev/sdd1'], ret)
|
||||
assert not mock.called, 'test mode failed, cmd.run called'
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user