test: move to koji-osbuild-tests package

This is similar to how other osbuild packages are testing: everything
that's needed for testing is included in the tests package or a
dependency of it. The test runner then runs every executable in
/usr/libexec/tests/<packagename>. This gives a simple test API to
projects depending on this package (notably osbuild-composer).

The local development workflow described in HACKING.md is meant to
continue to work. To ensure this, all relevant scripts gained a
TEST_DATA variable, which defaults to `./test`, but is set from $1 to
the installed path from integration.sh.
This commit is contained in:
Lars Karlitski 2020-11-19 00:05:36 +01:00
parent ade02b0c9a
commit 16f762c2ed
14 changed files with 132 additions and 64 deletions

View file

@ -158,7 +158,7 @@ void run_tests(test_type) {
if (test_type == 'integration') {
sh (
label: "Integration tests",
script: "test/integration.sh"
script: "/usr/libexec/tests/koji-osbuild/integration.sh"
)
}

View file

@ -84,8 +84,8 @@ gpgcheck=0
priority=10
EOF
# Install the Image Builder packages and the koji cli plugin.
retry sudo dnf -y install osbuild-composer koji-osbuild-cli
# Installing koji-osbuild-tests package
retry sudo dnf -y install koji-osbuild-tests
# Start services.
sudo systemctl enable --now osbuild-composer.socket