]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Move integration tests into python 2117/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 1 Dec 2023 10:22:21 +0000 (11:22 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 1 Dec 2023 12:31:18 +0000 (13:31 +0100)
commitb5b9963298900453446ca407d45cdc0085ef1649
treeb9279a298567d847b6f950c3e417dd9ef22efe5f
parent0dbb15c6333b7d7a5d32924108b3d8ae4c7e9950
Move integration tests into python

Instead of vendor locking ourselves to Github Actions, let's move
the integration tests into python so we can run them locally and
on other CI systems.

We opt to use unittest style test cases so that we can have a
configurable base class that can be used for various integration
tests. Unfortunately, I haven't found a nice and type safe way to
make pytest fixtures configurable so we opt for unittest instead.

Note that while we use the subTest() feature of unittest, pytest
still considers test_boot() a single test because it doesn't support
this particular feature of unittest. Ideally we switch our test runner
to something else in the future which does support the subTest() feature.

We always run steps that can run unprivileged without privileges even
if we're running as root so that tests can be run locally with root
privileges without ending up with a bunch of files owned by root
afterwards.
.github/workflows/ci.yml
pytest.ini [new file with mode: 0644]
tests/__init__.py
tests/test_boot.py [new file with mode: 0644]