test: depend on rpms rather than installing them explicitly

The -test subpackage should depend on all that it needs, and we should
never need to install anything explicitly from the test scripts.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-10-07 01:12:31 +01:00 committed by Ondřej Budai
parent 9246727096
commit 122ab25476
8 changed files with 62 additions and 48 deletions

View file

@ -24,16 +24,9 @@ if [[ $ID == rhel ]]; then
sudo rm -f /usr/lib/python3.6/site-packages/composer/cli/compose.pyc
fi
# We need jq for parsing composer-cli output.
if ! hash jq; then
greenprint "Installing jq"
sudo dnf -qy install jq
fi
# We need awscli to talk to AWS.
if ! hash aws; then
greenprint "Installing awscli"
sudo dnf -y install unzip
pushd /tmp
curl -Ls --retry 5 --output awscliv2.zip \
https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip

View file

@ -18,22 +18,10 @@ if [[ $ID == rhel ]] && ! rpm -q epel-release; then
sudo rpm -Uvh /tmp/epel.rpm
fi
greenprint "Installing required packages"
sudo dnf -y install \
container-selinux \
dnsmasq \
krb5-workstation \
koji \
podman \
python3 \
sssd-krb5
greenprint "Adding podman dnsname plugin"
if [[ $ID == rhel ]]; then
sudo cp /usr/share/tests/osbuild-composer/vendor/87-podman-bridge.conflist /etc/cni/net.d/
sudo cp /usr/share/tests/osbuild-composer/vendor/dnsname /usr/libexec/cni/
else
sudo dnf -y install podman-plugins
fi
greenprint "Starting containers"

View file

@ -44,17 +44,6 @@ if [[ $ID == rhel ]] && ! rpm -q epel-release; then
sudo rpm -Uvh /tmp/epel.rpm
fi
# Install required packages.
greenprint "📦 Installing required packages"
sudo dnf -y install jq libvirt-client libvirt-daemon \
libvirt-daemon-config-network libvirt-daemon-config-nwfilter \
libvirt-daemon-driver-interface libvirt-daemon-driver-network \
libvirt-daemon-driver-nodedev libvirt-daemon-driver-nwfilter \
libvirt-daemon-driver-qemu libvirt-daemon-driver-secret \
libvirt-daemon-driver-storage libvirt-daemon-driver-storage-disk \
libvirt-daemon-kvm qemu-img qemu-kvm virt-install expect \
python3-lxml ansible httpd
# Start libvirtd and test it.
greenprint "🚀 Starting libvirt daemon"
sudo systemctl start libvirtd

View file

@ -36,16 +36,6 @@ function greenprint {
echo -e "\033[1;32m${1}\033[0m"
}
# Install required packages.
greenprint "📦 Installing required packages"
sudo dnf -y install jq libvirt-client libvirt-daemon \
libvirt-daemon-config-network libvirt-daemon-config-nwfilter \
libvirt-daemon-driver-interface libvirt-daemon-driver-network \
libvirt-daemon-driver-nodedev libvirt-daemon-driver-nwfilter \
libvirt-daemon-driver-qemu libvirt-daemon-driver-secret \
libvirt-daemon-driver-storage libvirt-daemon-driver-storage-disk \
libvirt-daemon-kvm qemu-img qemu-kvm virt-install
# Start libvirtd and test it.
greenprint "🚀 Starting libvirt daemon"
sudo systemctl start libvirtd