tests/image: add booting tests

This commit makes the osbuild-image-tests binary doing the same set of tests
like the old test/run script.

Changes from test/run:
- qemu/nspawn are now killed gracefully. Firstly, SIGTERM is sent.
  If the process doesn't exit till the timeout, SIGKILL is sent.
  I changed this because nspawn leaves some artifacts behind when killed
  by SIGKILL.
- the unsharing of network namespace now works differently because of
  systemd issue #15079
This commit is contained in:
Ondřej Budai 2020-03-13 14:08:23 +01:00 committed by Tom Gundersen
parent f060c8d795
commit b4a7bc6467
7 changed files with 538 additions and 9 deletions

View file

@ -96,6 +96,11 @@ install -m 0644 -vp repositories/* %{buildroot}%{_datad
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/cases
install -m 0644 -vp test/cases/* %{buildroot}%{_datadir}/tests/osbuild-composer/cases/
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/keyring
install -m 0600 -vp test/keyring/* %{buildroot}%{_datadir}/tests/osbuild-composer/keyring/
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/cloud-init
install -m 0644 -vp test/cloud-init/* %{buildroot}%{_datadir}/tests/osbuild-composer/cloud-init/
install -m 0755 -vd %{buildroot}%{_unitdir}
install -m 0644 -vp distribution/*.{service,socket} %{buildroot}%{_unitdir}/
@ -149,13 +154,15 @@ Summary: Integration tests
Requires: osbuild-composer
Requires: composer-cli
Requires: createrepo_c
Requires: genisoimage
Requires: qemu-kvm-core
%description tests
Integration tests to be run on a pristine-dedicated system to test the osbuild-composer package.
%files tests
%{_libexecdir}/tests/osbuild-composer/*
%{_datadir}/tests/osbuild-composer/*
%{_libexecdir}/tests/osbuild-composer/
%{_datadir}/tests/osbuild-composer/
%{_libexecdir}/osbuild-composer/image-info
%package worker