diff --git a/oci-seccomp-bpf-hook.spec b/oci-seccomp-bpf-hook.spec index 348d4e7..da3df70 100644 --- a/oci-seccomp-bpf-hook.spec +++ b/oci-seccomp-bpf-hook.spec @@ -62,13 +62,13 @@ the Container Pod concept popularized by Kubernetes. Summary: Tests for %{name} Requires: %{name} = %{version}-%{release} -Requires: bats Requires: podman %description tests %{summary} -This package contains system tests for %{name} +This subpackage contains system tests for %{name}. It's only meant for gating +tests. End user / customer usage cases are not supported. %prep %autosetup -Sgit -n %{name}-%{built_tag_strip} diff --git a/tests/test_osbh.sh b/tests/test_osbh.sh index 4967c2a..8584024 100755 --- a/tests/test_osbh.sh +++ b/tests/test_osbh.sh @@ -1,14 +1,22 @@ #!/bin/bash -e +# Fetch and install bats +BATS_VERSION=1.11.1 +curl -L https://github.com/bats-core/bats-core/archive/refs/tags/v$BATS_VERSION.tar.gz | tar zx +pushd bats-core-$BATS_VERSION +./install.sh /usr +popd + + # Log program and kernel versions echo "Important package versions:" ( uname -r - rpm -qa | egrep 'podman|conmon|crun|runc|iptable|slirp|systemd|container-selinux' | sort + rpm -qa | grep -E 'podman|conmon|crun|runc|iptable|slirp|systemd|container-selinux' | sort ) | sed -e 's/^/ /' # Log environment; or at least the useful bits echo "Environment:" env | grep -v LS_COLORS= | sort | sed -e 's/^/ /' -bats /usr/share/oci-seccomp-bpf-hook/test/system +/usr/bin/bats /usr/share/oci-seccomp-bpf-hook/test/system