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

@ -13,9 +13,8 @@ RUN dnf -y upgrade \
python3-requests \
&& dnf clean all
COPY test/container/builder/kojid.conf /etc/kojid/kojid.conf
COPY plugins/builder/osbuild.py /usr/lib/koji-builder-plugins/
COPY test/container/builder/run-kojid.sh /app/run-kojid.sh
COPY test/container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
COPY container/builder/kojid.conf /etc/kojid/kojid.conf
COPY container/builder/run-kojid.sh /app/run-kojid.sh
COPY container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
ENTRYPOINT /app/run-kojid.sh

View file

@ -1,7 +1,7 @@
FROM registry.access.redhat.com/ubi8/ubi:latest
COPY test/container/rhel.repo /etc/yum.repos.d/
COPY test/container/brew.repo /etc/yum.repos.d/
COPY container/rhel.repo /etc/yum.repos.d/
COPY container/brew.repo /etc/yum.repos.d/
RUN dnf -y upgrade \
&& dnf -y \
@ -14,9 +14,8 @@ RUN dnf -y upgrade \
python3-requests \
&& dnf clean all
COPY test/container/builder/kojid.conf /etc/kojid/kojid.conf
COPY plugins/builder/osbuild.py /usr/lib/koji-builder-plugins/
COPY test/container/builder/run-kojid.sh /app/run-kojid.sh
COPY test/container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
COPY container/builder/kojid.conf /etc/kojid/kojid.conf
COPY container/builder/run-kojid.sh /app/run-kojid.sh
COPY container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
ENTRYPOINT /app/run-kojid.sh

View file

@ -2,10 +2,12 @@
set -ux
if ls /share/rpms/*.rpm 1> /dev/null 2>&1; then
echo "Using RPMs"
rm /usr/lib/koji-builder-plugins/osbuild.py
rpm -i /share/rpms/koji-osbuild-?-0.*.rpm \
/share/rpms/koji-osbuild-builder-*.rpm
echo "Using RPMs"
rpm -i /share/rpms/koji-osbuild-?-0.*.rpm \
/share/rpms/koji-osbuild-builder-*.rpm
else
echo "Using local plugin"
cp /share/plugins/builder/osbuild.py /usr/lib/koji-builder-plugins/
fi
KOJI="koji --server=http://org.osbuild.koji.koji/kojihub --user=kojiadmin --password=kojipass --authtype=password"