示例#1
0
class TestFileSystemXfs(object):
    @patch('os.path.exists')
    def setup(self, mock_exists):
        mock_exists.return_value = True
        provider = mock.Mock()
        provider.get_device = mock.Mock(return_value='/dev/foo')
        self.xfs = FileSystemXfs(provider, 'root_dir')
        self.xfs.setup_mountpoint = mock.Mock(return_value='some-mount-point')

    @patch('kiwi.filesystem_xfs.Command.run')
    def test_create_on_device(self, mock_command):
        self.xfs.create_on_device('label')
        call = mock_command.call_args_list[0]
        assert mock_command.call_args_list[0] == \
            call(['mkfs.xfs', '-f', '-L', 'label', '/dev/foo'])
示例#2
0
 def setup(self, mock_exists):
     mock_exists.return_value = True
     provider = mock.Mock()
     provider.get_device = mock.Mock(
         return_value='/dev/foo'
     )
     self.xfs = FileSystemXfs(provider, 'root_dir')
     self.xfs.setup_mountpoint = mock.Mock(
         return_value='some-mount-point'
     )
示例#3
0
class TestFileSystemXfs(object):
    @patch('os.path.exists')
    def setup(self, mock_exists):
        mock_exists.return_value = True
        provider = mock.Mock()
        provider.get_device = mock.Mock(
            return_value='/dev/foo'
        )
        self.xfs = FileSystemXfs(provider, 'root_dir')
        self.xfs.setup_mountpoint = mock.Mock(
            return_value='some-mount-point'
        )

    @patch('kiwi.filesystem_xfs.Command.run')
    def test_create_on_device(self, mock_command):
        self.xfs.create_on_device('label')
        call = mock_command.call_args_list[0]
        assert mock_command.call_args_list[0] == \
            call(['mkfs.xfs', '-f', '-L', 'label', '/dev/foo'])
示例#4
0
 def setup(self, mock_exists):
     mock_exists.return_value = True
     provider = mock.Mock()
     provider.get_device = mock.Mock(return_value='/dev/foo')
     self.xfs = FileSystemXfs(provider, 'root_dir')
     self.xfs.setup_mountpoint = mock.Mock(return_value='some-mount-point')