[c5c522c] | 1 | #!/bin/bash |
---|
| 2 | #for testing advanced proxy filtering |
---|
| 3 | |
---|
| 4 | source testlib || exit 1 |
---|
| 5 | |
---|
| 6 | DESCRIPTION1="Ssh beschikbaar?" |
---|
| 7 | VERIFYEXIT=0 |
---|
| 8 | sshtest || exit 1 |
---|
| 9 | |
---|
| 10 | DESCRIPTION1="Sla test over indien we niet de juiste licentieoptie hebben." |
---|
| 11 | CMD="cat /etc/webint/REG" |
---|
| 12 | VERIFYPOSITIVE='"I"' |
---|
| 13 | if ! sshtest; then |
---|
| 14 | echo "Dit is geen internetserver, test overgeslagen" |
---|
| 15 | exit 0 |
---|
| 16 | fi |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #### Zijn alle paginas uberhaubt opvraagbaar zonder errors? |
---|
| 20 | |
---|
| 21 | IGNOREERROR=1 |
---|
| 22 | DESCRIPTION1="Basic pagina check" |
---|
| 23 | PAGE="proxy/settings.php" |
---|
| 24 | VERIFYPOSITIVE="Proxy" |
---|
| 25 | scc_add |
---|
| 26 | |
---|
| 27 | DESCRIPTION1="Basic pagina check" |
---|
| 28 | PAGE="proxy/listtimefilters.php" |
---|
| 29 | VERIFYPOSITIVE="Dagen" |
---|
| 30 | scc_add |
---|
| 31 | |
---|
| 32 | DESCRIPTION1="Basic pagina check" |
---|
| 33 | PAGE="proxy/listfilters.php" |
---|
| 34 | VERIFYPOSITIVE="Filterlijst" |
---|
| 35 | scc_add |
---|
| 36 | |
---|
| 37 | DESCRIPTION1="Basic pagina check" |
---|
| 38 | PAGE="proxy/listhttpaccess.php" |
---|
| 39 | VERIFYPOSITIVE="Source netblock lijst All" |
---|
| 40 | scc_add |
---|
| 41 | #maak van alle filtertype's 1 aan |
---|
| 42 | |
---|
| 43 | 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" |
---|
| 44 | exit 0 |
---|
| 45 | |
---|
| 46 | IGNOREERROR=1 |
---|
| 47 | DESCRIPTION1="Maak tijdzone aan" |
---|
| 48 | PAGE="proxy/addtimefilter.php" |
---|
| 49 | METHOD="post" |
---|
| 50 | POSTBODY="new_Timefilter=werkweek&new_M=1&new_T=1&new_W=1&new_TimeStart=900&new_TimeEnd=910&save=1" |
---|
| 51 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 52 | scc_add |
---|
| 53 | |
---|
| 54 | DESCRIPTION1="Maak DomainIP filter aan" |
---|
| 55 | PAGE="proxy/addfilter.php" |
---|
| 56 | METHOD="post" |
---|
| 57 | POSTBODY="new_filter=domainIP&new_SquidFilterType=domainIP&save=1" |
---|
| 58 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 59 | scc_add |
---|
| 60 | |
---|
| 61 | DESCRIPTION1="Maak SourceList filter aan" |
---|
| 62 | PAGE="proxy/addfilter.php" |
---|
| 63 | METHOD="post" |
---|
| 64 | POSTBODY="new_filter=SourceList&new_SquidFilterType=SourceList&save=1" |
---|
| 65 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 66 | scc_add |
---|
| 67 | |
---|
| 68 | DESCRIPTION1="Maak PortList filter aan" |
---|
| 69 | PAGE="proxy/addfilter.php" |
---|
| 70 | METHOD="post" |
---|
| 71 | POSTBODY="new_filter=PortList&new_SquidFilterType=PortList&save=1" |
---|
| 72 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 73 | scc_add |
---|
| 74 | |
---|
| 75 | DESCRIPTION1="Maak DestList filter aan" |
---|
| 76 | PAGE="proxy/addfilter.php" |
---|
| 77 | METHOD="post" |
---|
| 78 | POSTBODY="new_filter=DestList&new_SquidFilterType=DestList&save=1" |
---|
| 79 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 80 | scc_add |
---|
| 81 | |
---|
| 82 | DESCRIPTION1="Maak ReqHead filter aan" |
---|
| 83 | PAGE="proxy/addfilter.php" |
---|
| 84 | METHOD="post" |
---|
| 85 | POSTBODY="new_filter=ReqHead&new_SquidFilterType=ReqHead&save=1" |
---|
| 86 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 87 | scc_add |
---|
| 88 | |
---|
| 89 | DESCRIPTION1="Maak ReqPro filter aan" |
---|
| 90 | PAGE="proxy/addfilter.php" |
---|
| 91 | METHOD="post" |
---|
| 92 | POSTBODY="new_filter=ReqPro&new_SquidFilterType=ReqPro&save=1" |
---|
| 93 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 94 | scc_add |
---|
| 95 | |
---|
| 96 | DESCRIPTION1="Maak MaxCon filter aan" |
---|
| 97 | PAGE="proxy/addfilter.php" |
---|
| 98 | METHOD="post" |
---|
| 99 | POSTBODY="new_filter=MaxCon&new_SquidFilterType=MaxCon&save=1" |
---|
| 100 | VERIFYPOSITIVE="HTTP/1.1 302 Found" |
---|
| 101 | scc_add |
---|
| 102 | |
---|
| 103 | IGNOREERROR=1 |
---|
| 104 | DESCRIPTION1="Maak ReqPro rule op filter aan" |
---|
| 105 | PAGE="proxy/addrule2filter.php?add=1&filter=ReqPro&type=ReqPro" |
---|
| 106 | METHOD="post" |
---|
| 107 | POSTBODY="save=1&new_filterrule=HTTP" |
---|
| 108 | VERIFYPOSITIVE="HTTP" |
---|
| 109 | scc_add |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | scc_test || exit 1 |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | echo "Proxy server testen: opvragen website www.w3c.org" |
---|
| 118 | PORT=3128 |
---|
| 119 | VERIFYPOSITIVE="content=\"W3C" |
---|
| 120 | BODY="GET http://www.w3.org |
---|
| 121 | " |
---|
| 122 | nettest > /dev/null || exit 1 |
---|
| 123 | |
---|