mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
IMPROVE Rate Limiting Test REF: #175
This commit is contained in:
parent
62bac74224
commit
2e9b584a0f
2 changed files with 19 additions and 18 deletions
|
@ -261,24 +261,25 @@ echo "${bold}${yellow}----------------------------------------------------------
|
||||||
printf "\n\n"
|
printf "\n\n"
|
||||||
sleep 10s
|
sleep 10s
|
||||||
|
|
||||||
if
|
ratelimittestfile=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/ratelimittest.txt
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
truncate -s 0 ${ratelimittestfile}
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 > ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 &
|
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile}
|
||||||
curl -A "GoogleBot" http://localhost:9000 2>&1 | grep -i 'Unavailable'; then
|
|
||||||
|
if grep -i 'Unavailable' < ${ratelimittestfile}; then
|
||||||
echo "${bold}${green}PASSED - ${red}GoogleBot was ${bold}${red}RATE LIMITED"
|
echo "${bold}${green}PASSED - ${red}GoogleBot was ${bold}${red}RATE LIMITED"
|
||||||
else
|
else
|
||||||
echo "${bold}${red}FAILED - ${red}GoogleBot was ${bold}${red}NOT RATE LIMITED"
|
echo "${bold}${red}FAILED - ${red}GoogleBot was ${bold}${red}NOT RATE LIMITED"
|
||||||
|
|
0
.dev-tools/test_units/ratelimittest.txt
Normal file
0
.dev-tools/test_units/ratelimittest.txt
Normal file
Loading…
Add table
Reference in a new issue