The test suite we use to indicate functional acceptance of a machine instance
Johnny Hughes
2016-05-18 97564ba26376308166c52fc01616de37d5ea989e
Merge pull request #16 from CentOS/revert-14-master

Revert "t_CheckExitStatus to have optional error message"
4 files modified
57 ■■■■ changed files
tests/0_lib/functions.sh 4 ●●● patch | view | raw | blame | history
tests/p_bzip2/10-bzip2-test.sh 6 ●●●● patch | view | raw | blame | history
tests/p_vconfig/10_test_vconfig.sh 38 ●●●● patch | view | raw | blame | history
tests/r_lamp/50_lamp_check_mysql55.sh 9 ●●●● patch | view | raw | blame | history
tests/0_lib/functions.sh
@@ -14,9 +14,7 @@
{
    [ $1 -eq 0 ] && { t_Log "PASS"; return $PASS; }
  comment=''
  [ "$2" ] && comment=": $2"
    t_Log "FAIL" $comment
    t_Log "FAIL"
    exit $FAIL
}
tests/p_bzip2/10-bzip2-test.sh
@@ -18,7 +18,11 @@
#run file through bzcat
bzcat $FILE.bz2 | grep -q 'bzip2-test of single file'
t_CheckExitStatus $? 'bzcat failed'
if [ $? == 1 ]
  then
  t_Log 'bzcat failed'
  exit
fi
#run file through bunzip2
bunzip2 $FILE.bz2
tests/p_vconfig/10_test_vconfig.sh
@@ -15,22 +15,44 @@
# create VLAN-IF 10 on eth0
vconfig add eth0 10
ip addr list | grep -q eth0.10
t_CheckExitStatus $? "VLAN-IF creation failed"
t_Log "VLAN-IF successfully created"
if [ $? == 1 ]
  then
  t_Log "VLAN-IF creation failed"
  ret_val=1
else
  t_Log "VLAN-IF successfully created"
fi
#assign IP address on VLAN-IF
ifconfig eth0.10 172.16.30.1 netmask 255.255.255.255
ip addr list | grep -q 172.16.30.1
t_CheckExitStatus $? "IP address assignment on eth0.10 failed"
t_Log "IP address successfully assigned on eth0.10"
if [ $? == 1 ]
  then
  t_Log "IP address assignment on eth0.10 failed"
  ret_val=1
else
  t_Log "IP address successfully assigned on eth0.10"
fi
#testing address with ping
ping -c 4 -q 172.16.30.1 | grep -q '4 received'
t_CheckExitStatus $? "pinging on eth0.10 failed"
t_Log "local ping on VLAN IF worked"
if [ $? == 1 ]
  then
  t_Log "pinging on eth0.10 failed"
  ret_val=1
else
  t_Log "local ping on VLAN IF worked"
fi
# delete VLAN-IF 10 on eth0
vconfig rem eth0.10
ip addr list | grep -q eth0.10
t_CheckExitStatus $? "Removing VLAN IF failed"
t_Log "Removing of VLAN IF worked"
if [ $? == 0 ]
  then
  t_Log "Removing VLAN IF failed"
  ret_val=1
else
  t_Log "Removing of VLAN IF worked"
fi
t_CheckExitStatus $ret_val
tests/r_lamp/50_lamp_check_mysql55.sh
@@ -39,7 +39,14 @@
        $SERVICE $D start &>/dev/null
        t_CheckExitStatus $? "FAIL: service startup for '$D' failed ($RETVAL)"
        RETVAL=$?
        if [ $RETVAL -ne 0 ]; then
                t_Log "FAIL: service startup for '$D' failed ($RETVAL)"
                exit $FAIL
        fi
done
for D in "${DAEMONSPID[@]}"
do