diff --git a/Sanity/install-dependencies/Makefile b/Sanity/install-dependencies/Makefile new file mode 100644 index 0000000..fbf0cc3 --- /dev/null +++ b/Sanity/install-dependencies/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/bind/Sanity/bind-dyndb-ldap +# Description: Test bind-dyndb-ldap is still installable +# Author: Petr Mensik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/bind/Sanity/install-dependencies +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include $(realpath /usr/share/rhts/lib/rhts-make.include) + +$(METADATA): Makefile + @echo "Owner: Petr Mensik " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test bind-libs dependencies are still installable" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: bind" >> $(METADATA) + @echo "Requires: bind" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/install-dependencies/PURPOSE b/Sanity/install-dependencies/PURPOSE new file mode 100644 index 0000000..a41544c --- /dev/null +++ b/Sanity/install-dependencies/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/bind/Sanity/install-dependencies +Description: Test bind-libs dependencies are still installable +Author: Petr Mensik diff --git a/Sanity/install-dependencies/main.fmf b/Sanity/install-dependencies/main.fmf new file mode 100644 index 0000000..bd59105 --- /dev/null +++ b/Sanity/install-dependencies/main.fmf @@ -0,0 +1,13 @@ +summary: Test bind-libs dependencies are still installable +description: '' +contact: +- Petr Mensik +component: +- bind +test: ./runtest.sh +framework: beakerlib +recommend: +- bind +duration: 5m +extra-summary: /CoreOS/bind/Sanity/install-dependencies +extra-task: /CoreOS/bind/Sanity/install-dependencies diff --git a/Sanity/install-dependencies/runtest.sh b/Sanity/install-dependencies/runtest.sh new file mode 100755 index 0000000..c3dbb9a --- /dev/null +++ b/Sanity/install-dependencies/runtest.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/bind/Sanity/install-dependencies +# Description: Test bind-dyndb-ldap is still installable +# Author: Petr Mensik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="bind" +# dnsperf 2.4.0 no longer depends on bind. +# But should be installable anyway. +DEPENDENCIES="bind-dyndb-ldap dnsperf" # freeipa-server-dns + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "VERSION=$(rpm -q $PACKAGE)" + rlPhaseEnd + + rlPhaseStartTest + for DEP in $DEPENDENCIES + do + rlRun "rpm -q $DEP" 1-255 "Make sure $DEP is not yet installed" + rlRun "dnf install --best -y $DEP" 0 "Install $DEP" + rlAssertRpm $DEP + done + rlAssertEqual "$PACKAGE version is unchanged" "$VERSION" "$(rpm -q $PACKAGE)" + rlPhaseEnd + + rlPhaseStartCleanup + for DEP in $DEPENDENCIES + do + rlRun "dnf remove -y $DEP" + done + rlPhaseEnd +rlJournalPrintText +rlJournalEnd