Try catching broken dependencies on update
Check whether non-bind srpm dependencies are still installed.
This commit is contained in:
parent
78e82abc04
commit
aa7c4e9e2d
4 changed files with 138 additions and 0 deletions
63
Sanity/install-dependencies/Makefile
Normal file
63
Sanity/install-dependencies/Makefile
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/bind/Sanity/bind-dyndb-ldap
|
||||
# Description: Test bind-dyndb-ldap is still installable
|
||||
# Author: Petr Mensik <pemensik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 <pemensik@redhat.com>" > $(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)
|
||||
3
Sanity/install-dependencies/PURPOSE
Normal file
3
Sanity/install-dependencies/PURPOSE
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
PURPOSE of /CoreOS/bind/Sanity/install-dependencies
|
||||
Description: Test bind-libs dependencies are still installable
|
||||
Author: Petr Mensik <pemensik@redhat.com>
|
||||
13
Sanity/install-dependencies/main.fmf
Normal file
13
Sanity/install-dependencies/main.fmf
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
summary: Test bind-libs dependencies are still installable
|
||||
description: ''
|
||||
contact:
|
||||
- Petr Mensik <pemensik@redhat.com>
|
||||
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
|
||||
59
Sanity/install-dependencies/runtest.sh
Executable file
59
Sanity/install-dependencies/runtest.sh
Executable file
|
|
@ -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 <pemensik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue