aboutsummaryrefslogtreecommitdiff
path: root/internal/db/mocks.go
Commit message (Collapse)AuthorAge
* db: add tests for authentication through login sources (#7049)Joe Chen2022-06-12
|
* db: use `context` and go-mockgen for `ReposStore` (#7046)Joe Chen2022-06-11
|
* db: use `context` and go-mockgen for `TwoFactorsStore` (#7045)Joe Chen2022-06-11
|
* db: use `context` and go-mockgen for `UsersStore` (#7042)Joe Chen2022-06-11
|
* db: use `context` and go-mockgen for login sources (#7041)Joe Chen2022-06-10
|
* db: use `context` and go-mockgen for `LFSStore` (#7038)Joe Chen2022-06-10
|
* db: use `context` and go-mockgen for `PermsStore` (#7033)Joe Chen2022-06-08
|
* db: rename `AccessTokensStore.Save` to `Touch` (#7029)Joe Chen2022-06-08
|
* db: use `context` and go-mockgen for `AccessTokensStore` (#7013)Joe Chen2022-06-06
|
* access_token: encrypt access token with SHA256 (#7008)E99p1ant2022-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * access_token: encrypt access token with SHA256 * revert list access token * fix lint * generate schemadoc * add database migrations * fix tests * fix tests * add test case for access token golden * fix test in postgres * `Sha256` -> `SHA256` * Use GORM for migration * task generate-schemadoc * Use unique * change migration name * allow read * task generate-schemadoc * add changelog * fix lint error * update changelog * remove Debug * add comments Co-authored-by: Joe Chen <jc@unknwon.io>
* db: migrate access table to use GORM (#6371)ᴜɴᴋɴᴡᴏɴ2020-10-06
|
* auth: decouple types and functions from db (#6320)ᴜɴᴋɴᴡᴏɴ2020-09-20
|
* db: add tests for users (#6116)ᴜɴᴋɴᴡᴏɴ2020-04-18
| | | | | | | | | | | | | | | | | | | | | * 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
* db: add tests for two factors (#6099)ᴜɴᴋɴᴡᴏɴ2020-04-14
| | | | | | | | | | | | | | | * Rename to TwoFactors.Create * Use GORM to execute queries * TwoFactor.GetByUserID * Add tests * Fix failing tests * Add MD5 tests * Add tests for RandomChars
* login_source: migrate to GORM and add tests (#6090)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | | | | | | | | | | | | | * 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
* db: add tests for permissions (#6088)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | | | * Add flag to print SQLs * Add tests for perms * Make results stable * codecov: only show diff * Once again, stable find results
* access_token: migrate to GORM and add tests (#6086)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * access_token: migrate to GORM * Add tests * Fix tests * Fix test clock
* lfsutil: add `Storager` interface and local storage (#6083)ᴜɴᴋɴᴡᴏɴ2020-04-10
| | | | | | | | | | | * Add Storager interface * Add tests * Add back note * Add tests for basic protocol routes * Fix lint errors
* lfs: add tests to batch endpoint (#6073)ᴜɴᴋɴᴡᴏɴ2020-04-06
|
* lfs: add unit test for middleware (#6070)ᴜɴᴋɴᴡᴏɴ2020-04-06
* Add unit test for `authenticate` middleware * Add more cases * Add tests for verifyOID and internalServerError * Add tests for verifyHeader * Add tests for authroize