#!/bin/bash #for testing advanced proxy filtering source testlib || exit 1 DESCRIPTION1="Ssh beschikbaar?" VERIFYEXIT=0 sshtest || exit 1 DESCRIPTION1="Sla test over indien we niet de juiste licentieoptie hebben." CMD="cat /etc/webint/REG" VERIFYPOSITIVE='"I"' if ! sshtest; then echo "Dit is geen internetserver, test overgeslagen" exit 0 fi #### Zijn alle paginas uberhaubt opvraagbaar zonder errors? IGNOREERROR=1 DESCRIPTION1="Basic pagina check" PAGE="proxy/settings.php" VERIFYPOSITIVE="Proxy" scc_add DESCRIPTION1="Basic pagina check" PAGE="proxy/listtimefilters.php" VERIFYPOSITIVE="Dagen" scc_add DESCRIPTION1="Basic pagina check" PAGE="proxy/listfilters.php" VERIFYPOSITIVE="Filterlijst" scc_add DESCRIPTION1="Basic pagina check" PAGE="proxy/listhttpaccess.php" VERIFYPOSITIVE="Source netblock lijst All" scc_add #maak van alle filtertype's 1 aan echo "Rest van de test overgeslagen: erwin, haal eerst de oude zooi weg. nu failed de test als je hem een 2e keer draait op zelfde bak" exit 0 IGNOREERROR=1 DESCRIPTION1="Maak tijdzone aan" PAGE="proxy/addtimefilter.php" METHOD="post" POSTBODY="new_Timefilter=werkweek&new_M=1&new_T=1&new_W=1&new_TimeStart=900&new_TimeEnd=910&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak DomainIP filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=domainIP&new_SquidFilterType=domainIP&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak SourceList filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=SourceList&new_SquidFilterType=SourceList&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak PortList filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=PortList&new_SquidFilterType=PortList&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak DestList filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=DestList&new_SquidFilterType=DestList&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak ReqHead filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=ReqHead&new_SquidFilterType=ReqHead&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak ReqPro filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=ReqPro&new_SquidFilterType=ReqPro&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add DESCRIPTION1="Maak MaxCon filter aan" PAGE="proxy/addfilter.php" METHOD="post" POSTBODY="new_filter=MaxCon&new_SquidFilterType=MaxCon&save=1" VERIFYPOSITIVE="HTTP/1.1 302 Found" scc_add IGNOREERROR=1 DESCRIPTION1="Maak ReqPro rule op filter aan" PAGE="proxy/addrule2filter.php?add=1&filter=ReqPro&type=ReqPro" METHOD="post" POSTBODY="save=1&new_filterrule=HTTP" VERIFYPOSITIVE="HTTP" scc_add scc_test || exit 1 echo "Proxy server testen: opvragen website www.w3c.org" PORT=3128 VERIFYPOSITIVE="content=\"W3C" BODY="GET http://www.w3.org " nettest > /dev/null || exit 1