Пример #1
0
 def test_parse_mount_with_zfs(self, mount_out):
     mount_out.return_value = (self.readResource('mount_parse_zfs.txt'), '')
     # this one is valid and exists in mount_parse_zfs.txt
     ret = util.parse_mount('/var')
     self.assertEqual(('vmzroot/ROOT/freebsd/var', 'zfs', '/var'), ret)
     # this one is the root, valid and also exists in mount_parse_zfs.txt
     ret = util.parse_mount('/')
     self.assertEqual(('vmzroot/ROOT/freebsd', 'zfs', '/'), ret)
     # this one does not even exist in mount_parse_ext.txt
     ret = util.parse_mount('/not/existing/mount')
     self.assertIsNone(ret)
Пример #2
0
 def test_parse_mount_with_zfs(self, mount_out):
     mount_out.return_value = (
         helpers.readResource('mount_parse_zfs.txt'), '')
     # this one is valid and exists in mount_parse_zfs.txt
     ret = util.parse_mount('/var')
     self.assertEqual(('vmzroot/ROOT/freebsd/var', 'zfs', '/var'), ret)
     # this one is the root, valid and also exists in mount_parse_zfs.txt
     ret = util.parse_mount('/')
     self.assertEqual(('vmzroot/ROOT/freebsd', 'zfs', '/'), ret)
     # this one does not even exist in mount_parse_ext.txt
     ret = util.parse_mount('/not/existing/mount')
     self.assertIsNone(ret)
Пример #3
0
 def test_parse_mount_with_ext(self, mount_out):
     mount_out.return_value = (self.readResource('mount_parse_ext.txt'), '')
     # this one is valid and exists in mount_parse_ext.txt
     ret = util.parse_mount('/var')
     self.assertEqual(('/dev/mapper/vg00-lv_var', 'ext4', '/var'), ret)
     # another one that is valid and exists
     ret = util.parse_mount('/')
     self.assertEqual(('/dev/mapper/vg00-lv_root', 'ext4', '/'), ret)
     # this one exists in mount_parse_ext.txt
     ret = util.parse_mount('/sys/kernel/debug')
     self.assertIsNone(ret)
     # this one does not even exist in mount_parse_ext.txt
     ret = util.parse_mount('/not/existing/mount')
     self.assertIsNone(ret)
Пример #4
0
 def test_parse_mount_with_ext(self, mount_out):
     mount_out.return_value = (
         helpers.readResource('mount_parse_ext.txt'), '')
     # this one is valid and exists in mount_parse_ext.txt
     ret = util.parse_mount('/var')
     self.assertEqual(('/dev/mapper/vg00-lv_var', 'ext4', '/var'), ret)
     # another one that is valid and exists
     ret = util.parse_mount('/')
     self.assertEqual(('/dev/mapper/vg00-lv_root', 'ext4', '/'), ret)
     # this one exists in mount_parse_ext.txt
     ret = util.parse_mount('/sys/kernel/debug')
     self.assertIsNone(ret)
     # this one does not even exist in mount_parse_ext.txt
     ret = util.parse_mount('/not/existing/mount')
     self.assertIsNone(ret)