Closed ghomem closed 4 years ago
Stuff to be checked:
Transaction added for the only situation where the db update is in two steps:
https://github.com/ghomem/overloop-101/commit/7fac7279592f6b6d686ab9d8481aabf3f406b8c5
nginx is in front of gunicorn for extra security (including SSL + specific selection of ciphers, reasonable default buffer sizes, etc)
Quick test sequence:
MYUSER=XXX
MYPASSWORD=ZZZ
MYHOSTNAME=XXX.YYY.ZZZ
curl https://${MYHOSTNAME}/articles
curl https://${MYHOSTNAME}/regions
curl https://${MYHOSTNAME}/authors
curl https://${MYHOSTNAME}/article/1
curl https://${MYHOSTNAME}/region/1
curl https://${MYHOSTNAME}/author/1
curl -X POST https://${MYHOSTNAME}/add_author --form username=$MYUSER --form password="$MYPASSWORD" --form 'content={"first_name":"Al","last_name":"Packa"}'
curl -X POST https://${MYHOSTNAME}/edit_author --form username=$MYUSER --form password="$MYPASSWORD" --form 'content={"id":"5", "first_name":"Al","last_name":"Pacone"}'
curl -X POST https://${MYHOSTNAME}/add_article --form username=$MYUSER --form password="$MYPASSWORD" --form 'content={"title":"2020 A Space Odissey","content":"Once upon a time..."}'
curl -X POST https://${MYHOSTNAME}/edit_article --form username=$MYUSER --form password="$MYPASSWORD" --form 'content={"id":"3", "title":"2020 A Space Odissey","content":"Twice upon a time..."}'
curl -X POST https://${MYHOSTNAME}/delete_article --form username=$MYUSER --form password="$MYPASSWORD" --form 'content={"id":"3"}'
Added extra checks on some parameters and beter error messages when the input is not considered valid.
Original requirement:
"The app should be robust and you should make sure that everything works as specified."