Ejemplo n.º 1
0
class TestContainerImageDocker(object):
    def setup(self):
        self.docker = ContainerImageDocker("root_dir")

    @patch("kiwi.container_image_docker.ArchiveTar")
    def test_create(self, mock_archive):
        archive = mock.Mock()
        mock_archive.return_value = archive
        self.docker.create("result.tar.xz")
        mock_archive.assert_called_once_with("result.tar")
        archive.create_xz_compressed.assert_called_once_with(
            exclude=["image", ".profile", ".kconfig", "var/cache/kiwi", "boot"], source_dir="root_dir"
        )
Ejemplo n.º 2
0
class TestContainerImageDocker(object):
    def setup(self):
        self.docker = ContainerImageDocker('root_dir')

    @patch('kiwi.container_image_docker.ArchiveTar')
    def test_create(self, mock_archive):
        archive = mock.Mock()
        mock_archive.return_value = archive
        self.docker.create('result.tar.xz')
        mock_archive.assert_called_once_with('result.tar')
        archive.create_xz_compressed.assert_called_once_with(
            exclude=[
                'image', '.profile', '.kconfig', 'var/cache/kiwi', 'boot'
            ],
            source_dir='root_dir')
Ejemplo n.º 3
0
 def setup(self):
     self.docker = ContainerImageDocker("root_dir")
Ejemplo n.º 4
0
 def setup(self):
     self.docker = ContainerImageDocker('root_dir')