bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_webalizer/webalizer_test.sh

Steve Barnes 09d4e5
#!/bin/sh
Steve Barnes 09d4e5
# Author: Athmane Madjoudj <athmanem@gmail.com>
Steve Barnes 09d4e5
Steve Barnes 09d4e5
t_Log "Running $0 - Webalizer test."
Steve Barnes 09d4e5
Pablo Greco a54477
if [ "$centos_ver" -ge 7 ] ; then
650b5f
 t_Log "No webalizer package for CentOS $centos_ver -> SKIP"
650b5f
 t_CheckExitStatus 0
650b5f
 exit 0
650b5f
fi
650b5f
Steve Barnes 09d4e5
# Run some requests 
Steve Barnes 09d4e5
for i in `seq 10`
Steve Barnes 09d4e5
do
Steve Barnes 09d4e5
    curl http://localhost/ > /dev/null 2>&1
Steve Barnes 09d4e5
done
Steve Barnes 09d4e5
Steve Barnes 09d4e5
# Trigger webalizer cron manualy
Steve Barnes 09d4e5
/etc/cron.daily/00webalizer
Steve Barnes 09d4e5
Steve Barnes 09d4e5
# Run the test
Steve Barnes bf9e19
curl -s http://localhost/usage/ | grep 'Usage Statistics for' > /dev/null 2>&1
Steve Barnes 09d4e5
Steve Barnes 09d4e5
t_CheckExitStatus $?