1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00

tests: Add a suite which runs tests under systemd

And add a single test which verifies that our internal `reboot`
code actually does what it should (via systemd-run etc.)

This took me way, way too long to do...there were so many missteps
and confusion. First of all, I kept trying to use `systemd.extra-unit`
from https://www.freedesktop.org/software/systemd/man/latest/systemd-debug-generator.html#
but that doesn't exist in stream9.

I spent way too long trying to debug the fact that switching from
`podman run <image> /sbin/init` to `podman run <image> /bin/sh -c '<stuff> && exec /sbin/init`
fails because in the latter case podman's auto-detection fails and
we need to explicitly say `--systemd=always`. In retrospect obvious...but oh well.

On the positive side, I think with some cleanup we could extend this model
and generalize it for "test running in a container with systemd" (with
a lot of cleanup really)

Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
Colin Walters
2025-07-17 14:38:21 -04:00
parent b696395744
commit d4c19f7d31
6 changed files with 66 additions and 1 deletions

View File

@@ -56,7 +56,7 @@ jobs:
run: sudo apt update && sudo apt install just
- uses: actions/checkout@v4
- name: Build and run container integration tests
run: sudo just run-container-integration
run: sudo just run-container-integration run-container-external-tests
cargo-deny:
runs-on: ubuntu-latest
steps: