Fix Adminer tests

This commit is contained in:
cytopia 2019-12-08 11:11:37 +01:00
parent e2930d2b4e
commit 4ac8eb17d2
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
3 changed files with 42 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@ -81,19 +81,42 @@ fi
### ###
### Test Adminer MongoDB login ### Test Adminer Mongo login
### ###
printf "[TEST] Adminer Mongo login" printf "[TEST] Adminer Mongo login"
if ! run "\ if ! run "\
curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}${URL}?mongo=mongo&username=' \ curl -sS --fail -c cookie.txt -b cookie.txt \
-L \
--data 'auth[driver]=mongo' \
--data 'auth[server]=mongo' \
--data 'auth[username]=' \
--data 'auth[password]=' \
--data 'auth[db]=' \
'http://localhost:${HOST_PORT_HTTPD}${URL}?mongo=mongo&username=' \
| tac \ | tac \
| tac \ | tac \
| grep -Ei 'Database.+Collation.+Tables' >/dev/null" \ | grep -Ei 'Database.+Collation.+Tables' >/dev/null" \
"${RETRIES}" "" "0"; then "${RETRIES}" "" "0"; then
printf "\\r[FAIL] Adminer Mongo login\\n" printf "\\r[FAIL] Adminer MySQL login\\n"
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}${URL}?mongo=mongo&username=' || true" run "curl -sS -c cookie.txt -b cookie.txt \
run "curl -sS -I 'http://localhost:${HOST_PORT_HTTPD}${URL}?mongo=mongo&username=' || true" -L \
--data 'auth[driver]=mongo' \
--data 'auth[server]=mongo' \
--data 'auth[username]=' \
--data 'auth[password]=' \
--data 'auth[db]=' \
'http://localhost:${HOST_PORT_HTTPD}${URL}?server=mysql&username=root|| true'" "1"
run "curl -sS -I -c cookie.txt -b cookie.txt \
-L \
--data 'auth[driver]=mongo' \
--data 'auth[server]=mongo' \
--data 'auth[username]=' \
--data 'auth[password]=' \
--data 'auth[db]=' \
'http://localhost:${HOST_PORT_HTTPD}${URL}?server=mysql&username=root|| true'" "1"
rm -f cookie.txt
exit 1 exit 1
else else
printf "\\r[OK] Adminer Mongo login\\n" printf "\\r[OK] Adminer MySQL login\\n"
fi fi
rm -f cookie.txt