Compare commits

...
Sign in to create a new pull request.

10 commits

Author SHA1 Message Date
Branislav Náter
b2cfc5919d Moving contact to root main.fmf 2022-04-20 10:32:00 +02:00
Iveta Cesalova
962d15465d add new test 2021-03-12 11:00:51 +01:00
Iveta Cesalova
af4d88711c adjust main.fmf 2021-03-10 18:47:29 +01:00
Iveta Cesalova
5ac69c5fe0 adjust main.fmf 2021-03-10 18:45:25 +01:00
Iveta Cesalova
c7472425eb remove fips and module tests 2021-03-10 15:25:15 +01:00
Iveta Cesalova
f91b7ff2ae delete TC#0577328.fmf 2021-03-10 13:50:47 +01:00
Iveta Cesalova
b9b6e25e48 delete TC#0577346.fmf 2021-03-10 13:45:48 +01:00
Iveta Cesalova
f1b2412822 remove Makefile PURPOSE 2021-03-10 10:13:14 +01:00
Iveta Cesalova
aa40b4deae daemon-selinux-context added 2021-03-10 10:10:40 +01:00
Iveta Cesalova
b3ae3c6032 add plan 2021-03-09 11:04:39 +01:00
12 changed files with 185 additions and 43 deletions

View file

@ -0,0 +1,7 @@
component:
- squid
tag:
- TIPpass_Apps
- Tier1
extra-nitrate: TC#0334116
extra-summary: /CoreOS/squid/Sanity/daemon-selinux-context

View file

@ -0,0 +1,20 @@
summary: test selinux context of all squid's processes
description: |
There is different context on RHEL5 and RHEL{6,7} expected.
Every process with name "squid" is checked.
Author: Ondrej Ptak <optak@redhat.com>
contact: Iveta Cesalova <icesalovr@redhat.com>
component:
- squid
test: ./runtest.sh
framework: beakerlib
require:
- library(squid/squid)
recommend:
- squid
duration: 5m
enabled: true
tier: '1'
extra-summary: /CoreOS/squid/Sanity/daemon-selinux-context
extra-task: /CoreOS/squid/Sanity/daemon-selinux-context

View file

@ -0,0 +1,68 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/squid/Sanity/daemon-selinux-context
# Description: test selinux context of all squid's processes
# Author: Ondrej Ptak <optak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 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 Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGES=${PACKAGES:-"squid"}
rlJournalStart
rlPhaseStartSetup
rlImport --all
rlAssertRpm --all
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "squidStart"
rlPhaseEnd
rlPhaseStartTest
rlRun "squid_pids=\$(ps axo pid,comm|grep '\bsquid\b'|awk '{print \$1}')"\
0 "detecting squid's processes"
rlRun " [ -n \"$squid_pids\" ] " 0 "squid has at least one running process"
if rlIsRHEL 5 ; then
grep_pattern="(user_u|root):system_r:squid_t"
else
grep_pattern="(system_u|unconfined_u):system_r:squid_t:s0"
fi
for p in $squid_pids;
do
rlRun "ps -Z $p > ps_log" 0 "getting selinux context of process $p"
rlAssertGrep "$grep_pattern" ps_log -E || \
rlLogInfo "$p's context is: \"$(cat ps_log|grep squid|awk '{print $1}')\""
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "squidStop"
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,13 +0,0 @@
component: []
environment:
MODSTREAMS: squid:4
tag:
- TIPpass_Apps
- TIPpass_FIPS
- TestCaseCopy
- Tier1
tier: '1'
relevancy: |
distro < rhel-8: False
extra-nitrate: TC#0577328
extra-summary: /CoreOS/squid/Sanity/smoke [squid:4]

View file

@ -1,14 +0,0 @@
component:
- squid
environment:
FIPS: 'true'
tag:
- FIPS
- TIPfail
- TIPfail_Apps
- TIPpass_FIPS
relevancy: |
# https://wiki.test.redhat.com/BaseOs/Security/FIPS/#SupportedPlatforms
distro = rhel-alt-7: False
extra-nitrate: TC#0607255
extra-summary: /CoreOS/squid/Sanity/smoke (FIPS)

View file

@ -1,14 +0,0 @@
component: []
environment:
MODSTREAMS: squid:4
FIPS: 'true'
tag:
- FIPS
- TIPpass_Apps
- TIPpass_FIPS
- TestCaseCopy
- squid:4
relevancy: |
distro < rhel-8: False
extra-nitrate: TC#0607257
extra-summary: /CoreOS/squid/Sanity/smoke (FIPS) [squid:4]

View file

@ -1,10 +1,8 @@
summary: simple and fast smoke test
description: ''
contact: Branislav Náter <bnater@redhat.com>
component:
- squid
test: ./runtest.sh
path: /Sanity/smoke
framework: beakerlib
require:
- library(httpd/http)

View file

@ -0,0 +1,8 @@
tag:
- NoRHEL4
- NoRHEL5
- Tier2
relevancy: |
distro < rhel-7: False
extra-nitrate: TC#0602107
extra-summary: /CoreOS/squid/Regression/bz1691741-cache-peer-DNS-lookup-failed-with-lower-case

View file

@ -0,0 +1,18 @@
summary: Test for BZ#1691741 (Squid cache_peer DNS lookup failed when not all)
description: |
Bug summary: Squid cache_peer DNS lookup failed when not all lower case
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1691741
contact: Iveta Cesalova <icesalov@redhat.com>
component:
- squid
test: ./runtest.sh
framework: beakerlib
require:
- library(squid/squid)
recommend:
- squid
duration: 10m
enabled: true
tier: '2'
extra-summary: /CoreOS/squid/Regression/bz1691741-cache-peer-DNS-lookup-failed-with-lower-case
extra-task: /CoreOS/squid/Regression/bz1691741-cache-peer-DNS-lookup-failed-with-lower-case

View file

@ -0,0 +1,57 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/squid/Regression/bz1691741-cache-peer-DNS-lookup-failed-with-lower-case
# Description: Test for BZ#1691741 (Squid cache_peer DNS lookup failed when not all)
# Author: Maryna Nalbandian <mnalband@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 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
PACKAGES=${PACKAGES:-"squid"}
HOST=R610
rlJournalStart
rlPhaseStartSetup
rlRun "rlImport --all" || rlDie
rlAssertRpm --all
rlRun "rlFileBackup /etc/hosts $squidCONF"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "echo '127.0.0.2 $HOST' >> /etc/hosts"
rlRun "echo 'cache_peer $HOST parent 3128 3130 default' >> $squidCONF"
rlRun "squidRestart"
rlAssertNotGrep "WARNING: DNS lookup for '$HOST' failed!" /var/log/squid/cache.log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "squidStop"
rlRun "rlFileRestore"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

2
main.fmf Normal file
View file

@ -0,0 +1,2 @@
# QE owner
contact: Branislav Náter <bnater@redhat.com>

5
plans/all.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Run all tests
discover:
how: fmf
execute:
how: tmt