Commit Graph

11 Commits

Author SHA1 Message Date
Alexandre Detiste
fb69627ad3
Use unittest.mock from core python everywhere
mock was an independent module that has been merged into the Python standard library.
2024-02-18 22:15:30 +01:00
Igor Raits
1f547d6bb9
Stop copying /dev files statically into the OCI container
In containers (nspawn) where part of the /dev filesystem is bind-mounted
from outside system, kiwi fails to do the rsync (in creation of the
nodes).

There is no reason to actually copy whole tree inside so let's just
not do it (as it does not seem to be needed at all).
2022-10-22 08:09:46 +02:00
Marcus Schäfer
9c9250ebc4
Support nose and xunit style tests
The modifications in this commit allows the unit tests
to run on both, pytest 6.x (nose test layout) and the new
pytest 7.x (xunit test layout). This Fixes #2072 in a
much nicer way. Thanks much to @smarlowucf
2022-02-26 20:26:18 +01:00
Marcus Schäfer
1f869e7ca8
Revert "Unit test adaptions to pytest v7"
This reverts commit 0dc2e803e0.
The pytest interface from version v6 to v7 has received
changes which requires the tests to be adapted to work for
either the old or the new interface. As there are still many
distributions which uses v6 as the standard we decided to
revert back the adaptions done to support v7 and create
a version requirement to v6 in .virtualenv.dev-requirements.txt
This Fixes #2072
2022-02-26 20:19:42 +01:00
Marcus Schäfer
0dc2e803e0
Fixed unit tests
The pytest interface setup() method call has changed
in a way that an additional parameter is passed to
the method which leads to a python error at invocation
time if the setup method does not define it.
2022-02-07 21:27:39 +01:00
Marcus Schäfer
ce9b1ccc08
Added option to set the image target architecture
The option --target-arch allows to set the architecture
used to build the image. By default this is the host
architecture. Please note, if the specified architecture
name does not match the host architecture and is therefore
requesting a cross architecture image build, it's important
to understand that for this process to work a preparatory
step to support the image architecture and binary format
on the building host is required and is not considered a
responsibility of kiwi. There will be a followup effort
on providing a plugin for kiwi which should be used to
manage the needed binfmt settings for cross arch image
builds
2021-04-14 12:53:28 +02:00
David Cassany
99be52baec
Refactor container factory classes
This commit refactors the container related classes to turn them into
proper factory classes and also includes type hints to facilitate
it's use from an API POV. Related to #1498
2020-12-15 20:19:10 +01:00
David Cassany
ac7bed3221
Get default maintainer and author from image description
This commit sets the maintainer and author metadata from the description
section of the image in they are not explicitly specified in
container-config section.

In addition it sets the default container name to `system-container`
instead of `systemContainer` as uppercase letters are not valid for
docker container references.

Fixes #1419
2020-09-21 10:24:31 +02:00
Marcus Schäfer
44a1d78e96
Added new image type: wsl
Support for building appx container images for
Windows Subsystem Linux (WSL). This Fixes #1235
2020-03-26 19:42:25 +01:00
Marcus Schäfer
a62cbd5edb
Cleanup fstab handling for containers
When building container images an extra create_fstab method
exists that created an empty fstab file. The reasons for this
are historical and also related to appx support from obs.
The obs based support for appx containers was based on the
creation of a kiwi docker image that got modified and turned
into an appx container. Now with native appx support by kiwi
this special fstab handling is no longer needed and should
be deleted. This Fixes #1329
2020-03-18 14:12:54 +01:00
David Cassany
4b3a105026
Re-structure unit tests folders
This commit relocates unit tests to a folder structure that matches
the source code structure.

Fixes #1128
2019-10-21 14:00:05 +02:00