add test
This commit is contained in:
parent
beb2c43155
commit
fdcd11f161
2 changed files with 80 additions and 0 deletions
25
Sanity/smoke/main.fmf
Normal file
25
Sanity/smoke/main.fmf
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
summary: Simple smoke test using library httpd/Library/http
|
||||
description: ''
|
||||
component:
|
||||
- wget
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
recommend:
|
||||
- httpd
|
||||
- wget
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- TIPfail_infra
|
||||
- TIPfail_samba
|
||||
- TIPfail_systemd
|
||||
- TIPpass
|
||||
- TIPpass_Apps
|
||||
- Tier1
|
||||
- TierSecurity
|
||||
tier: '1'
|
||||
extra-nitrate: TC#0325124
|
||||
extra-summary: /CoreOS/wget/Sanity/smoke
|
||||
extra-task: /CoreOS/wget/Sanity/smoke
|
||||
55
Sanity/smoke/runtest.sh
Executable file
55
Sanity/smoke/runtest.sh
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/wget/Sanity/smoke
|
||||
# Description: Simple smoke test using library httpd/Library/http
|
||||
# Author: Ondrej Ptak <optak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES="wget"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm --all
|
||||
rlRun "rlImport httpd/http" 0 "import httpd/http library"
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "httpStart" 0 "start http server"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "wget http://localhost/http_testfile" 0 "download test file"
|
||||
rlAssertExists http_testfile
|
||||
rlAssertGrep "ok" http_testfile
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "httpStop" 0 "stop http server"
|
||||
rlRun "popd"
|
||||
rlRun "rm -rf $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue