Skip to content

Commit

Permalink
Webstandard should not fail on 403 errors
Browse files Browse the repository at this point in the history
Those were not found before as we only tested a subset. Also removed a
forgotten debug statement.
  • Loading branch information
vmcj committed Jun 21, 2024
1 parent b86283c commit f5a8247
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/jobs/webstandard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if [ $RET -ne 4 ] && [ $RET -ne 0 ] && [ $RET -ne 8 ]; then
exit $RET
fi

EXPECTED_HTTP_CODES="200\|302\|400\|404"
EXPECTED_HTTP_CODES="200\|302\|400\|404\|403"
if [ "$ROLE" = "public" ]; then
# It's expected to encounter a 401 for the login page as we supply the wrong password
EXPECTED_HTTP_CODES="$EXPECTED_HTTP_CODES\|401"
Expand All @@ -87,7 +87,6 @@ set -e
echo "$NUM_ERRORS"
if [ "$NUM_ERRORS" -ne 0 ]; then
echo "Entered the if"
grep -v "HTTP/1.1\" \($EXPECTED_HTTP_CODES\)" /var/log/nginx/domjudge.log | grep -v "robots.txt"
exit 1
fi
Expand Down Expand Up @@ -133,7 +132,16 @@ else
FLTR=""
else
STAN="-s $TEST"
FLTR="-E '#DataTables_Table_0 > tbody > tr > td > a','#menuDefault > a','#filter-card > div > div > div > span > span:nth-child(1) > span > ul > li > input',.problem-badge"
FLTR0="-E '#editor0 > textarea','#editor1 > textarea','html > body > div > div > div > form > ul > li','html > body > div > div > div > form','#DataTables_Table_0 > tbody > tr > td > a','#menuDefault > a','#filter-card > div > div > div > span > span:nth-child(1) > span > ul > li > input',.problem-badge,'html > body > div:nth-child(3) > div > div > div > div:nth-child(3) > div:nth-child(1) > table > tbody > tr:nth-child(1) > td:nth-child(4) > a > span','#DataTables_Table_0 > tbody > tr > td > form','html > body > div > div > div > div > div > div > table > tbody > tr > td > a > span'"
FLTR1="'html > body > div > div > div > div > div > table > tbody > tr > td > a','html > body > div:nth-child(2) > div > div > div:nth-child(5) > div > table > tbody > tr > td:nth-child(5) > form'"
FLTR2="'html > body > div > div > div > div > div > table > tbody > tr > td > form > div > input','html > body > div > div > div > div > div > table > tbody > tr > td > form > div > input'"
FLTR3="'html > body > div > div > div > div > div > table > tbody > tr > td > form','html > body > div > div > div > div > div > table > tbody > tr > td > form > div > input'"
FLTR10="'#editor0 > textarea','#editor1 > textarea','html > body > div > div > div > form > ul > li','html > body > div > div > div > form','#DataTables_Table_0 > tbody > tr > td > a','#menuDefault > a','#filter-card > div > div > div > span > span > span > ul > li > input',.problem-badge,'html > body > div > div > div > div > div > div > table > tbody > tr > td > a > span','#DataTables_Table_0 > tbody > tr > td > form','html > body > div > div > div > div > div > div > table > tbody > tr > td > a > span'"
FLTR11="'html > body > div > div > div > div > div > table > tbody > tr > td > a','html > body > div > div > div > div > div > table > tbody > tr > td > form'"
FLTR12="'html > body > div > div > div > div > div > table > tbody > tr > td > form > div > input','html > body > div > div > div > div > div > table > tbody > tr > td > form > div > input'"
FLTR13="'html > body > div > div > div > div > div > table > tbody > tr > td > form','html > body > div > div > div > div > div > table > tbody > tr > td > form > div > input'"
FLTR14="'html > body > div > div > div > div > table > tbody > tr > td > a','#submissions_filter > div > span > span > span > ul > li > input','#filter-card > div > form'"
FLTR="$FLTR0,$FLTR1,$FLTR2,$FLTR3,$FLTR10,$FLTR11,$FLTR12,$FLTR13,$FLTR14"
fi
chown -R domjudge:domjudge "$DIR"
cd "$DIR"
Expand Down

0 comments on commit f5a8247

Please sign in to comment.