realaravinth
8c9587ad65
feat: set custom runers and queue length
2022-08-09 16:30:04 +05:30
realaravinth
249b6461ee
chore: migrate tests to also run with mariadb
2022-07-23 11:59:42 +05:30
realaravinth
d7fd23f565
chore: get rid of direct DB init and use db_*
2022-05-27 18:25:27 +05:30
realaravinth
4cd4605266
chore: use local app ctx
2022-05-27 15:25:10 +05:30
realaravinth
a971d4209d
fix and chore: refactor tests to minimize initializing DB connections
...
SUMMARY
The test suite was spinning up way too many database connections that what's
strictly needed and so the test suite was failing with[0]:
code: "53300", message: "sorry, too many clients already"
EXPERIMENTS
Tried sharing database connection pool across all tests with
async_once[0] but faced:
- IO errors
The connections were probably getting dropped in between tests
- actix Actor errors
The actor was probably not getting initialized before a
a reference to the async_once initialized app
context(crate::data::Data) is retrieved and used
FIX
crate::tests was spinning up an App context
instance(crate::data::Data) for most utility functions, which was
unnecessarily excessive.
Each test now creates an instance of the application context at the
beginning and shared a reference with all test utility functions. So
number of database connections/app context instance = number of unit
tests.
[0]: permanently fixes #22
[1]: https://docs.rs/async_once/latest/async_once/
2022-05-14 12:55:56 +05:30
realaravinth
0c1a82b4c5
feat: migrate tests utils to use db_* interface
2022-05-12 19:33:26 +05:30
realaravinth
4248959b13
feat: migrate user regisration to use db_*
2022-05-11 13:33:29 +05:30
realaravinth
1d8554cb36
chore: rust fmpt
2022-05-11 13:33:29 +05:30
realaravinth
91c6f77cab
chore: update actix-* deps
2022-05-07 16:10:14 +05:30
realaravinth
73ce2d1cb1
refactor captcha.rs and levels.rs and rm duration routes
2021-12-16 20:46:50 +05:30
realaravinth
b5af9ee259
it appears actix-web's scope behaviour has changed in the latest beta
...
release:
Routes 404'd when scope contained trailing slash like so:
let scope = "/api/v1/pow/";
web::scope(scope)//
So had to rm trailing slash in scope
2021-11-29 17:33:08 +05:30
realaravinth
147f563ec8
demo user task
2021-08-09 11:56:25 +05:30
realaravinth
1b0a95e768
tests: get status code from err
2021-07-17 18:57:33 +05:30
realaravinth
8f87efeeb3
error correction, tests for err branches, rm get_token, get_token,
...
delete captcha
2021-07-17 17:43:53 +05:30
realaravinth
ea8264054a
edit sitekey, router pattern matching, sitekey update optimization, rm level delete and level err handling
2021-07-16 17:40:52 +05:30
realaravinth
47cca5c9a7
notifications view
2021-07-12 21:22:26 +05:30
realaravinth
b7ec1bca22
duplicate email check and address clippy warnings
2021-07-11 21:46:50 +05:30
realaravinth
9f940c317a
upgrading to actix-v4-beta
2021-06-30 20:13:12 +05:30
realaravinth
d5aceb60b4
sign in with email
2021-06-29 19:42:07 +05:30
realaravinth
cc17f2048f
errorable and seperated runner methods for auth
2021-06-28 19:16:59 +05:30
realaravinth
dcfba60c86
addressing clippy lints
2021-06-11 23:39:38 +05:30
realaravinth
f5624947b9
redis storage for captcha mech
2021-06-11 19:31:03 +05:30
realaravinth
9e70f8f756
rename guard -> mcaptcha
2021-06-01 17:33:47 +05:30
realaravinth
98cf4a476d
widget: verification works
2021-05-29 21:19:45 +05:30
realaravinth
417e008c27
favicons
2021-05-29 00:04:11 +05:30
realaravinth
91ca00ea79
get notifications
2021-05-10 15:38:09 +05:30
realaravinth
30f457ca43
deprecated mcaptcha add route
2021-05-06 13:57:14 +05:30
realaravinth
98719670df
sitekey list
2021-05-04 18:34:36 +05:30
realaravinth
e83a362e75
added duration field to add_level
2021-05-04 10:49:44 +05:30
realaravinth
812b0ff2c9
add site key form
2021-05-03 20:24:03 +05:30
realaravinth
ef778687e0
cleanup
2021-05-02 16:44:54 +05:30
realaravinth
76ae2b03e9
migrated auth, account and meta to use const routes
2021-05-02 16:11:01 +05:30
realaravinth
4f27e1ab8d
using constants for routes
2021-05-02 12:39:37 +05:30
realaravinth
c7bac9e623
server-side password validation
2021-05-02 10:32:22 +05:30
realaravinth
d32350e2b6
email optional
2021-04-12 11:14:21 +05:30
realaravinth
bbf182a918
changes to test suite to use new routes
2021-04-11 23:50:53 +05:30
realaravinth
e76dd8014c
pow get config
2021-04-10 17:00:54 +05:30
realaravinth
4e7e8da574
rm domains and added authorization check at all endpoints
2021-04-09 16:52:05 +05:30
realaravinth
51764817f9
domain verification
2021-03-26 22:18:01 +05:30
realaravinth
ee548588a8
refactoring
2021-03-24 17:57:29 +05:30
realaravinth
e5ae38472d
levels, duration and tests
2021-03-13 23:50:14 +05:30
realaravinth
096dcd32e4
cascading delete, mcaptcha add/del and test suite
2021-03-11 20:58:18 +05:30
realaravinth
a73725eb39
del user, add del domains
2021-03-11 15:30:05 +05:30