increase test coverage
split off #110
parts of this require #135 (closed) for clean testing
-
add test for ratelimit -
add test for autoban from ratelimit (via ip) -
add test for autoban from ratelimit (via user) - complete datadump test
-
fetch the zip file afterwards, kinda-requires email mock, can be done without by peeking at email_dump_tokens
-
make user have at least one file and shorten -
maybe open the zip file and check if the file and shorten exist, as well as user.json
pointing with the right user id -
change mtime of zip file and tick janitor, check it went away
-
-
complete purge_all_content test -
make user upload two files, then test a delete on the test domain (requires resource management) -
make user have at least one shorten -
check shorten is deleted afterwards
-
-
add test for thumbnailing -
add different cases for listing ( limit
coerced to 1-100 range no matter what value, invalid ids on before/after) -
enhance profile update test -
password update (would break test client, need to solve that too) -
domain, subdomain update -
shorten_domain, shorten_subdomain update -
add test for failing cases (no password, admin-only domain on a non-admin user, disabled profile feature)
-
-
add test to delete own user (good to have email mock, use email_deletion_tokens
if not, would break test client) -
add test for password recovery (good to have email mock, can be done without by peeking at email_pwd_reset_tokens
) -
add test for register (good to have email mock, include failing email in the mock, maybe with app._email_mock.failing():
?) -
add test for username recovery (good to have email mock) -
add edge-case tests for shorten (broken urls, long urls, maybe we can test quota explosion by setting it low for test user?) -
enhance upload testing: -
send the same file twice, notice deduplication -
send a jpg, that triggers exif codetest case not found -
send an incorrect file (just random data) -
check if we can do virus scanning tests, maybe?CI now has ClamAV!
-
-
add asserts for checking datadump in GET /api/profile
after starting datadump job -
add test for basic User model functionality -
add test for basic Domain model functionality (requires !91 (merged)) -
document test_sflake_overflow
, what the bug was about, also rename the function, and bump from 4097 to 5000 test snowflakes and assert they make sense -
add tests to ensure Storage works in its circunstances (fetch a user that doesn't exist)
admin api
-
add test for admin broadcast and admin sendmail (requires email mock) -
add test to add a domain (requires resource management) -
add tests to get/update/delete a file/shorten (requires resource management) -
add test to update settings -
add test to check for audit log emails (requires enhancing MockAuditLog and email mock) -
add test for activating a user via email (requires email mock) -
add test when deleting doll user (assert its not possible)
Edited by luna