Commit Graph

178 Commits

Author SHA1 Message Date
d6d6e35e53 Fix Set-Cookie header not propagating into HTTPException, use delete_cookie helper 2024-11-10 13:24:55 -06:00
1c979ed18a Fix mypy union-attr warning
stupid, I checked it twice and there's no possible way for it to be
None?
2024-11-10 13:17:18 -06:00
066b3e82ff reformat, organize imports 2024-11-10 13:15:28 -06:00
16b70bb0de Update CHANGELOG.md 2024-11-10 13:08:28 -06:00
1ea3bc20db Add additional logs, finish test_auth_logout_expired 2024-11-10 13:03:32 -06:00
4d6c46a309 Fix broken expired_session fixture, add test for future 2024-11-10 13:00:37 -06:00
d8659c903f Fix test_session not using proper generate_token(), fix session_constraint_expiry
test_session_constraint_expiry was violating multiple constraints
actually, it wasn't properly testing the expiry detail
2024-11-10 12:55:53 -06:00
20a243ddfc logout route test 2024-11-10 12:48:11 -06:00
6ffc84fce3 Logout route, SessionDependency DI model 2024-11-10 12:48:04 -06:00
00a3643079 Add proper cookie expiry time to Login route 2024-11-10 12:13:56 -06:00
32645a588a Update CHANGELOG.md 2024-11-10 00:38:34 -06:00
55eb864f77 fixup test_auth_login, add expiry assertions 2024-11-10 00:31:52 -06:00
cb8dd80f33 finish login function, true hash of user fixture 2024-11-10 00:16:37 -06:00
10919d0333 Switch limits to asynchronous storage/strategy 2024-11-09 23:27:27 -06:00
fd90873f7b Add test_auth_login 2024-11-09 23:24:30 -06:00
4c2c4bc2ad Add hacky fix for rate-limiter segregation between pytests 2024-11-09 23:23:55 -06:00
cd900288ff Extend black line-length to 110 2024-11-09 23:23:21 -06:00
058be9602a Use nproc to specify xdist workers 2024-11-09 22:52:25 -06:00
fa80bd0649 Use xdist auto in pytest workflow 2024-11-09 22:47:17 -06:00
ee4f3c64d9 Switch test_user user fixture to proper hasher 2024-11-09 22:44:57 -06:00
a4c8336c1a Add limits package, RateLimiter dependency, test_depends, begin /api/login route 2024-11-09 22:43:53 -06:00
47dc26f842 add email-validator package 2024-11-09 21:31:13 -06:00
15ce80bb66 migration: User.password_hash length to 97, Session.token index
off by one hell fml
also why's the index only applying now? what'd I do lol
2024-11-09 21:30:46 -06:00
126d6b4757 move migration squashing suggestion limit to 15 2024-11-09 21:30:09 -06:00
93a6dd5972 workspace diagnostic mode, cSpell ignorePaths 2024-11-09 20:49:10 -06:00
8c111cf14e Minor formatting concerns, remove dangling IPAddress usage 2024-11-09 20:39:27 -06:00
be4942c1d8 Add misc router for health/migration routes, rename 'authentication' router to 'auth' 2024-11-09 20:22:18 -06:00
1075d05a43 Remove problematic final coverage step
No idea what's going wrong with this thing, but it's never worked
properly
2024-11-09 20:16:13 -06:00
f9b12b8d0a Add validate_session() with constraint tests 2024-11-09 20:13:49 -06:00
d996d30d81 Add missing save() call, add TODOs, explicit default last_used to None
Doesn't seem like explicitly setting the default to None does much here;
automatic migration didn't trigger.
2024-11-09 20:12:48 -06:00
40e4e4f4b8 correctly add names to table constraints, fix inverted constraint for session_last_used_created 2024-11-09 20:08:10 -06:00
4467195cb8 Custom session constraints migration
The automatic migrator wouldn't do this on it's own, I manually made
this migration
2024-11-09 17:49:49 -06:00
591635fa70 Fix literal arg for migrate 2024-11-09 17:41:10 -06:00
ced662a7e8 Disable captured log, use pretty stderr output 2024-11-09 17:30:46 -06:00
afd29806dc test utc_now, hacky fix for TZ Aware/Naive comparison when fetching datetimes 2024-11-09 17:30:28 -06:00
d725d1b863 Add test_session, add randomizers, move test_app, user/session fixtures 2024-11-09 17:00:45 -06:00
35d967360d Integrate pytest into run.sh cleanly, use $@ args directly in COMMAND def 2024-11-09 16:39:36 -06:00
6920098487 Add pytest-xdist for parallel testing 2024-11-09 16:39:09 -06:00
e5e718d3e4 migration: Session model, User.flags field 2024-11-09 16:29:46 -06:00
07c9a724a2 Add user soft delete ability via BitField flags, explicit on_delete CASCADE, Session.is_expired(), Session.use() 2024-11-09 16:07:49 -06:00
295a499c92 Remove coverageHtml echo line 2024-11-09 15:47:56 -06:00
43c00056b7 Remove accidentally added if check from coverageComment step 2024-11-09 15:42:52 -06:00
e76b321469 Use poetry version in env, use for cache key 2024-11-09 15:41:26 -06:00
2c4e7ddfcd use .venv for proper Poetry cache 2024-11-09 15:41:01 -06:00
5508b8e6f4 use relative path 2024-11-09 15:36:55 -06:00
fcfa213eed limit checklist invocation to CHANGELOG path 2024-11-09 15:36:08 -06:00
d38362819e Add contents read permission, required for checkout 2024-11-09 15:33:47 -06:00
53a0ac0624 Add token permissions for coverage-comment, fully qualify & use development environment in run.sh DB URL 2024-11-09 15:31:38 -06:00
f1be6676d1 Add pytest/coverage file check since pytest-coverage-comment does not error 2024-11-09 15:28:11 -06:00
78a82311a2 Fix coverage/junit generated paths (backend) 2024-11-09 15:25:33 -06:00