Commit Graph

6 Commits (1df62fafb99c03d4d3d4b26c99839d165d5425da)

Author SHA1 Message Date
Joe Chen 94059f291d
db: use `context` and go-mockgen for `LFSStore` (#7038) 2022-06-10 11:27:06 +08:00
Joe Chen 5f34265db6
ci: run database tests against Postgres, MySQL and SQLite (#6996) 2022-06-01 22:51:46 +08:00
ᴜɴᴋɴᴡᴏɴ 519e59b577
db: migrate to GORM v2 (#6309) 2020-09-06 10:11:08 +08:00
ᴜɴᴋɴᴡᴏɴ 9d64d222a8
db: add tests for users (#6116)
* Add new methods

* Use Users.Create to replace previous hack

* Reduce side effect

* Do not clear tables when test failed

* test_users_Authenticate

* Rename constant

* test_users_Create

* test_users_GetByEmail

* test_users_GetByID

* test_users_GetByUsername
2020-04-18 12:07:30 +08:00
ᴜɴᴋɴᴡᴏɴ 41f56ad05d
login_source: migrate to GORM and add tests (#6090)
* Use GORM in all write paths

* Migrate to GORM

* Fix lint errors

* Use GORM  to init table

* dbutil: make writer detect error

* Add more tests

* Rename to clearTables

* db: finish adding tests

* osutil: add tests

* Fix load source files path
2020-04-11 20:18:05 +08:00
ᴜɴᴋɴᴡᴏɴ e077ecdd9d
db: add tests for LFS (#6087)
* Improve DB test setup

* Discard GORM logs in non-verbose mode

* Add tests to lfs

* Fix data race
2020-04-11 02:56:37 +08:00