Adding test

This commit is contained in:
Petr Sklenar 2022-01-04 20:01:12 +01:00
commit 609e63fec6
5 changed files with 139 additions and 0 deletions

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits
# Description: What the test does
# Author: Tomas Korbar <tkorbar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2020 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/Regression/bz1848169-named-checkconf-cidr-host-bits
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE bad.conf
.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 /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Tomas Korbar <tkorbar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: What the test does" >> $(METADATA)
@echo "Type: Regression" >> $(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 "Bug: 1848169 1865785" >> $(METADATA)
@echo "Releases: RHEL8" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits
Description: What the test does
Author: Tomas Korbar <tkorbar@redhat.com>

View file

@ -0,0 +1,3 @@
controls {
inet 172.17.1.98 port 953 allow { 172.17.1.1/24; };
};

View file

@ -0,0 +1,24 @@
summary: What the test does
description: ''
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
framework: beakerlib
recommend:
- bind
duration: 5m
enabled: true
tag:
- TIPpass
- TIPpass_infra
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1848169
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1865785
adjust:
- enabled: false
when: distro != rhel-8
continue: false
extra-nitrate: TC#0608023
extra-summary: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits
extra-task: /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits

View file

@ -0,0 +1,45 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1848169-named-checkconf-cidr-host-bits
# Description: What the test does
# Author: Tomas Korbar <tkorbar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2020 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"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest
rlRun "named-checkconf ./bad.conf" 0 "Check configuration file"
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd