delete test
This commit is contained in:
parent
5925109e72
commit
2521e5d345
4 changed files with 0 additions and 149 deletions
|
|
@ -1,17 +0,0 @@
|
|||
component:
|
||||
- php
|
||||
contact: Jakub Heger <jheger@redhat.com>
|
||||
extra-nitrate: TC#0058630
|
||||
extra-pepa: |
|
||||
PACKAGES='php php-cli' component/php
|
||||
REQUIRES='httpd perl curl' component/php
|
||||
extra-summary: /CoreOS/php/misc/phpinfo
|
||||
relevancy: |
|
||||
distro = rhel-4, rhel-5, rhel-6: False
|
||||
tag:
|
||||
- HttpdSclDone
|
||||
- NoModularTier
|
||||
- TIPfail_Security
|
||||
- TIPpass_Apps
|
||||
- TestParametrized
|
||||
- Tier1
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php phpinfo(); ?>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
component:
|
||||
- php
|
||||
description: ''
|
||||
duration: 5m
|
||||
enabled: true
|
||||
extra-task: /CoreOS/php/misc/phpinfo
|
||||
require:
|
||||
- php
|
||||
- php-fpm
|
||||
- php-cli
|
||||
- perl
|
||||
- perl-interpreter
|
||||
- curl
|
||||
- httpd
|
||||
- httpd
|
||||
- curl
|
||||
- sed
|
||||
- grep
|
||||
- library(php/utils)
|
||||
- library(httpd/http)
|
||||
summary: Simple test for phpinfo()
|
||||
test: ./runtest.sh
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/php/misc/phpinfo
|
||||
# Description: Simple test for phpinfo()
|
||||
# Author: David Kutalek <dkutalek@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# 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/bin/rhts-environment.sh || exit 1
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
# Packages to be tested
|
||||
PACKAGES=${PACKAGES:-php php-cli}
|
||||
# Other required packages
|
||||
REQUIRES=${REQUIRES:-httpd perl curl}
|
||||
|
||||
# Use php-fpm instead of mod_php on RHEL8 and later
|
||||
rlIsRHEL "<=7" && phpUsePhpFpm="no"
|
||||
|
||||
REPRODUCER="info.php"
|
||||
URL="http://localhost/$REPRODUCER"
|
||||
TESTDIR=$(pwd)
|
||||
|
||||
set -o pipefail
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "rlImport httpd/http" 0 "Import httpd library"
|
||||
rlImport "php/utils"
|
||||
rlAssertRpm --all
|
||||
|
||||
phpPopulateSources # needed for phpAssertFileOrigin
|
||||
phpMainPackage
|
||||
if [ "$phpUsePhpFpm" == 'no' ]; then
|
||||
phpChooseModPhpConfig
|
||||
else
|
||||
PHP_FPM_RPM=$(rpm -qf $(which php-fpm) --qf '%{NAME}')
|
||||
rlServiceStart "$PHP_FPM_RPM"
|
||||
fi
|
||||
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp $REPRODUCER ${httpROOTDIR}"
|
||||
rlRun "pushd $TmpDir"
|
||||
|
||||
rlRun "httpStart" 0 "Start httpd"
|
||||
|
||||
if [ "$phpUsePhpFpm" == "no" ]; then
|
||||
phpAssertModPhpLoaded
|
||||
phpAssertFileOrigin $(phpPrintLoadedModPhpLibs)
|
||||
php_lib=$(phpPrintLoadedModPhpLibs | grep '\/libphp\|fileinfo.so$' | head -1)
|
||||
else
|
||||
phpAssertFileOrigin $(phpPrintLoadedPhpFpmLibs)
|
||||
php_lib=$(phpPrintLoadedPhpFpmLibs | grep '\/libphp\|fileinfo.so$' | head -1)
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "php-cli"
|
||||
# Test that the phpinfo() function has produced some useful output
|
||||
rlRun "php $TESTDIR/$REPRODUCER | sed -n '/PHP Version/{s/.*Version[^0-9]*\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;p;}' | head -1 | tee output" 0
|
||||
rlRun "rpm -q --qf '%{version}\n' $(rpm -qf $(which php)) | sed 1q | tee rpmoutput" 0
|
||||
rlAssertNotDiffer output rpmoutput
|
||||
rlPhaseEnd
|
||||
|
||||
if [ -n "$phpUsePhpFpm" ]; then
|
||||
rlPhaseStartTest "mod_php"
|
||||
else
|
||||
rlPhaseStartTest "php-fpm"
|
||||
fi
|
||||
# Test that the phpinfo() function has produced some useful output
|
||||
rlRun "curl $URL | sed -n '/PHP Version/{s/.*Version[^0-9]*\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;p;}' | head -1 | tee curloutput" 0
|
||||
rlRun "rpm -q --qf '%{version}\n' $(rpm -qf $php_BIN) | sed 1q | tee rpmoutput" 0
|
||||
rlRun "rpm -q --qf '%{version}\n' $(rpm -qf $php_lib) | sed 1q | tee rpmoutput2" 0
|
||||
rlAssertNotDiffer curloutput rpmoutput
|
||||
rlAssertNotDiffer curloutput rpmoutput2
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm ${httpROOTDIR}/$REPRODUCER"
|
||||
rlFileRestore
|
||||
if [ -n "$phpUsePhpFpm" ]; then
|
||||
rlServiceRestore "$PHP_FPM_RPM"
|
||||
fi
|
||||
rlRun "httpStop" 0 "Stop httpd"
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue