Skip to content

Commit

Permalink
Update test-blocker-quick.sh
Browse files Browse the repository at this point in the history
Add extra test for oBot
  • Loading branch information
mitchellkrogza authored Mar 27, 2024
1 parent a1afe75 commit 1808bcb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dev-tools/test-blocker-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ else
fi
}

run_curltest13 () {
if curl -A "oBot" http://localhost:80/index.html 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}oBot GOOD BOT ALLOWED THROUGH"
else
echo "${bold}${red}FAILED - ${red}oBot GOOD BOT NOT ALLOWED THROUGH"
exit 1
fi
}

testBadUserAgents () {
shuf -n 10 ./_generator_lists/bad-user-agents.list > ./dev-tools/test_units/random-bots-for-test-quick.tmp
sed 's/\\//g' ./dev-tools/test_units/random-bots-for-test-quick.tmp > ./dev-tools/test_units/random-bots-for-test-quick.list
Expand Down Expand Up @@ -295,6 +304,7 @@ run_curltest8
run_curltest10
run_curltest11
run_curltest12
run_curltest13
testBadUserAgents
testGoodUserAgents
testAllowedUserAgents
Expand Down

0 comments on commit 1808bcb

Please sign in to comment.