def test_mounts_and_persist_a_device(self, log, check_output, fstab):
"""Check if a mount works with the persist flag set to True
"""
device = '/dev/guido'
mountpoint = '/mnt/guido'
options = 'foo,bar'
result = host.mount(device, mountpoint, options, persist=True)
self.assertTrue(result)
check_output.assert_called_with(['mount', '-o', 'foo,bar',
'/dev/guido', '/mnt/guido'])
fstab.add.assert_called_with('/dev/guido', '/mnt/guido', 'ext3',
options='foo,bar')
result = host.mount(device, mountpoint, options, persist=True,
filesystem="xfs")
self.assertTrue(result)
fstab.add.assert_called_with('/dev/guido', '/mnt/guido', 'xfs',
options='foo,bar')
评论列表
文章目录