Commit Graph

21 Commits

Author SHA1 Message Date
Kian-Meng Ang
bb42841a66 Fix typos 2022-08-04 23:06:54 +08:00
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
f165581e17 chore: lints 2022-05-11 20:11:11 +05:30
realaravinth
f337721b25 feat: move health endpoint to use ping from db_* 2022-05-11 13:33:29 +05:30
realaravinth
fc8a1670d2 update copyright notice 2022-01-08 22:16:05 +05:30
realaravinth
b7ec1bca22 duplicate email check and address clippy warnings 2021-07-11 21:46:50 +05:30
realaravinth
481cb95cd2 addressing clippy lints 2021-06-29 20:12:51 +05:30
realaravinth
9636180673 redis health check: return err when unable to connect 2021-06-13 12:53:58 +05:30
realaravinth
3132a48087 add redis to health check 2021-06-12 13:44:18 +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
fcdbe66b26 captcha stats 2021-05-27 14:47:29 +05:30
realaravinth
72667bd2e1 using custom version of actix-codegen and cors for pow routes 2021-05-25 14:34:24 +05:30
realaravinth
ef778687e0 cleanup 2021-05-02 16:44:54 +05:30
realaravinth
5361e9b43a mcaptcah uses const routes 2021-05-02 16:35:15 +05:30
realaravinth
76ae2b03e9 migrated auth, account and meta to use const routes 2021-05-02 16:11:01 +05:30
realaravinth
e0dab001aa OAS: domains 2021-03-31 12:25:39 +05:30
realaravinth
8e77345f15 build and health check 2021-03-24 12:43:32 +05:30