diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index 2c7ed80..ea3831d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,4 +3,4 @@ product_versions: - rhel-* decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..2d64611 --- /dev/null +++ b/plans.fmf @@ -0,0 +1,10 @@ +/tier1-internal: + discover: + how: fmf + url: https://gitlab.com/redhat/rhel/tests/avahi.git + filter: 'tier: 1' + execute: + how: tmt + adjust: + enabled: false + when: distro == centos-stream or distro == fedora diff --git a/tests/Basic-sanity-test/Makefile b/tests/Basic-sanity-test/Makefile deleted file mode 100644 index ce59f5b..0000000 --- a/tests/Basic-sanity-test/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/avahi/Sanity/Basic-sanity-test -# Description: Tests basic functionality of avahi. -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# 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, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/avahi/Sanity/Basic-sanity-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -e runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Tests basic functionality of avahi." >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: avahi" >> $(METADATA) - @echo "Requires: avahi avahi-tools bind bind-chroot bind-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RedHatEnterpriseLinux3 -RedHatEnterpriseLinux4" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Basic-sanity-test/PURPOSE b/tests/Basic-sanity-test/PURPOSE deleted file mode 100644 index 1486bec..0000000 --- a/tests/Basic-sanity-test/PURPOSE +++ /dev/null @@ -1,15 +0,0 @@ -PURPOSE of /CoreOS/avahi/Sanity/Basic-sanity-test -Description: Tests basic functionality of avahi. -Author: Martin Cermak - -My objective was to write a very basic sanity test for avahi. -As I'm the avahi newbie, I browsed avahi.org, experimented -a little with RHEL avahi packages and pinged Lennart, which -did not respond. - -My result is a simple test for the avahi domain name resolver. -It requires the avahi-daemon running. As the RHTS/Beaker is/will -shortly be a closed system without the possibility to reach the -outside network, this test contains its own nameserver. - - diff --git a/tests/Basic-sanity-test/named.conf b/tests/Basic-sanity-test/named.conf deleted file mode 100644 index e477af9..0000000 --- a/tests/Basic-sanity-test/named.conf +++ /dev/null @@ -1,11 +0,0 @@ -options { - directory "/var/named"; - allow-query { any; }; -}; - -zone "" IN { - type master; - file ".zone"; - allow-update { none; }; -}; - diff --git a/tests/Basic-sanity-test/runtest.sh b/tests/Basic-sanity-test/runtest.sh deleted file mode 100755 index b027d39..0000000 --- a/tests/Basic-sanity-test/runtest.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/avahi/Sanity/Basic-sanity-test -# Description: Tests basic functionality of avahi. -# Author: Martin Cermak -# Author: Tomas Dolezal - rhel7 updates -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# 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, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh - -TEMPSTR=$(date +%c%N | md5sum | awk '{print $1}' | cut -c -8) -ORIGPWD=$(pwd) - -IP1='127.0.0.1' -IP2='::1' - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm 'avahi' - rlAssertRpm 'avahi-tools' - - rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - - ROOTDIR="" #using non-chroot - rlFileBackup /etc/named.conf /etc/resolv.conf - rlFileBackup --clean /var/named/ - cat $ORIGPWD/named.conf > /etc/named.conf - - rlRun "TDOMAIN=$TEMPSTR.cz" - rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.zone" - - # set up /etc/named.conf - rlRun "sed -i \"s//$TDOMAIN/g\" /etc/named.conf" - - # set up zonefile - rlRun "cp $ORIGPWD/zonefile $TZONEFILE" - rlRun "chmod a+r $TZONEFILE" - rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP1/g\" $TZONEFILE" - rlRun "sed -i \"s//$IP2/g\" $TZONEFILE" - rlRun "sed -i \"s//$(date +%N)/g\" $TZONEFILE" - - rlServiceStart named #using non-chroot - - # set default resolver - rlRun "echo nameserver 127.0.0.1 > /etc/resolv.conf" - rlPhaseEnd - - rlPhaseStartTest - # check bind - rlRun "dig @localhost server1.$TDOMAIN +short | grep $IP1" - rlRun "dig AAAA @localhost server2.$TDOMAIN +short | grep $IP2" - - # turn on avahi or restart it with new resolv.conf - rlServiceStart "avahi-daemon" - - # the test itself... - rlRun "avahi-resolve -4n server1.$TDOMAIN | grep '127.0.0.1'" 0 "Test the IPv4 avahi DN resolver." - rlRun "avahi-resolve -6n server2.$TDOMAIN | grep '::1'" 0 "Test the IPv6 avahi DN resolver." - - rlPhaseEnd - - rlPhaseStartCleanup - rlFileRestore - rlServiceStart avahi-daemon - rlServiceRestore named avahi-daemon - - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd - rlJournalPrintText -rlJournalEnd diff --git a/tests/Basic-sanity-test/zonefile b/tests/Basic-sanity-test/zonefile deleted file mode 100644 index 46b8421..0000000 --- a/tests/Basic-sanity-test/zonefile +++ /dev/null @@ -1,23 +0,0 @@ -$ORIGIN . -$TTL 86400 -@ IN SOA dns1.. hostmaster.. ( - ; serial - 21600 ; refresh after 6 hours - 3600 ; retry after 1 hour - 604800 ; expire after 1 week - 86400 ) ; minimum TTL of 1 day - - IN NS dns1.. - IN NS dns2.. - - IN MX 10 mail.. - IN MX 20 mail2.. - - IN A - -server1 IN A -server2 IN AAAA - -dns1 IN A -dns2 IN A - diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 09b2613..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- - -# Tests that run in classic context -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - Basic-sanity-test - required_packages: - - avahi - - avahi-tools - - bind - - bind-chroot - - bind-utils