Commit graph

46 commits

Author SHA1 Message Date
Aravinth Manivannan
9cc667851c
feat: run integration tests using nightwatch js 2023-04-30 20:17:51 +05:30
realaravinth
96119fdc71
feat: adapt migrate and sqlx-offline-data to include mariadb support 2022-07-23 15:50:47 +05:30
realaravinth
249b6461ee
chore: migrate tests to also run with mariadb 2022-07-23 11:59:42 +05:30
realaravinth
912b342e0e
feat: conditionally init postgres/mariadb connection 2022-07-23 11:59:42 +05:30
realaravinth
b12c30e956
feat: cache-bust when make run is called 2022-07-23 00:48:05 +05:30
realaravinth
3710c8f653
feat: fix sqlx offline compilation 2022-05-27 19:06:07 +05:30
realaravinth
21dcc2144b
feat: add cmd to run db tests only 2022-05-27 17:07:05 +05:30
realaravinth
9d7bb3c0be
feat: use cache busting bin and load assets generated by it 2022-05-14 16:00:22 +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
c458e4a233
fix: inject postgres URL while running migrations 2022-05-12 19:57:06 +05:30
realaravinth
55518ef650
feat: define captcha_exists interface 2022-05-12 19:31:26 +05:30
realaravinth
bd75fc625c
feat: migrate adding captcha to use db_* interface 2022-05-12 19:10:04 +05:30
realaravinth
28ddadc5fe
feat: define interface for getting user secret 2022-05-11 20:21:06 +05:30
realaravinth
f165581e17
chore: lints 2022-05-11 20:11:11 +05:30
realaravinth
136439c97a
feat: add sqlx offline data generation 2022-05-11 13:33:30 +05:30
realaravinth
6ab6df02ed
fix: use db/db-migrations for DB migrations 2022-05-11 13:33:29 +05:30
realaravinth
9e5b54a23d
feat: setup tests on db_* workspaces 2022-05-11 13:33:29 +05:30
realaravinth
b7a8716a82
feat: define checking routine 2022-05-11 13:33:29 +05:30
realaravinth
a00823544e
hotfix: run tests one at a time
SUMMARY
    The test suite messy and inefficient in every imaginable way. It
    creates a DB connection pool for every unit test and Postgres failed
    with the following error:

    code: "53300", message: "sorry, too many clients already

    This hotfix runs tests via scripts/tests.sh, which executes one test
    at a time.

    Ideally, the connection pool must be shared across the whole test
    suite but this requires a major refactor of the test suite and even
    the app code. A refactor towards this is in progress in the
    `db-abstract` branch, which I hope to complete within this week.

fixes #22
2022-05-09 11:33:28 +05:30
realaravinth
87f09b6bfb
chore: migrate dart-sass to sass 2022-05-08 17:36:49 +05:30
realaravinth
5ac0b36255
update dockerfile to make config 2021-12-16 15:55:46 +05:30
realaravinth
5afa531bb8
build sass using dart-sass, bypassing css extractor 2021-12-10 06:16:03 +05:30
realaravinth
410232041b
setup librejs license and cachebust service worker file 2021-12-02 14:25:50 +05:30
realaravinth
ab77eed91c
move pow wasm lib out to a separate repo 2021-12-01 21:18:30 +05:30
realaravinth
eedec7da34
implement librejs compliance 2021-11-30 18:45:02 +05:30
realaravinth
f2f8632679
udpate deps and test openapi spec 2021-11-29 17:32:33 +05:30
realaravinth
e78e18a411
fix CI error and cache clippy and fmt jobs 2021-10-08 18:58:20 +05:30
realaravinth
46e7656967
make: clean up help and add documentaiton 2021-10-08 16:02:35 +05:30
realaravinth
975b6ca57a
make: add openapi deps installtion 2021-10-08 15:57:27 +05:30
realaravinth
428d60ebb0
setup openapi spec build chain 2021-10-08 15:55:53 +05:30
realaravinth
97db774e70
docker: wasm build step 2021-07-15 15:27:01 +05:30
realaravinth
704f8bf2b4
add mcaptcha-browser as dep 2021-07-09 13:57:55 +05:30
realaravinth
5daa46e76e
CI: list assets when running test 2021-07-09 13:16:54 +05:30
realaravinth
0880dd27ce
configuration docs, make test 2021-07-09 12:04:48 +05:30
realaravinth
2e50c263a8
makeifle: clean and test workflows 2021-07-07 21:10:15 +05:30
realaravinth
eb5c0164dc
makeifle: make migrate 2021-07-07 18:20:06 +05:30
realaravinth
bfebca6e0e
widget static resources are now built locally 2021-07-07 00:28:32 +05:30
realaravinth
5d55971f19
docker makefile rules and updated widget res 2021-07-05 02:22:02 +05:30
realaravinth
6184fe7efe
build tools: webpack with typescript and scss compilation 2021-05-05 23:21:59 +05:30
realaravinth
e9c84b4ed4
Dockerfile init 2021-05-04 10:30:22 +05:30
realaravinth
812b0ff2c9
add site key form 2021-05-03 20:24:03 +05:30
realaravinth
90424219f5
site-key form made resulable 2021-05-01 14:41:22 +05:30
realaravinth
343c37ae1c
changed login route 2021-04-30 18:06:28 +05:30
realaravinth
646a92b28f
registration link correction 2021-04-09 15:03:50 +05:30
realaravinth
0496c0bdaf
frontend integration 2021-04-09 14:21:43 +05:30
realaravinth
d7b1a9f29b
wip makefile 2021-04-08 15:49:55 +05:30