forgejo/tests
caicandong 491cc06ffe
Fix the error message when the token is incorrect ()
we refactored `userIDFromToken` for the token parsing part into a new
function `parseToken`. `parseToken` returns the string `token` from
request, and a boolean `ok` representing whether the token exists or
not. So we can distinguish between token non-existence and token
inconsistency in the `verfity` function, thus solving the problem of no
proper error message when the token is inconsistent.
close   
related 

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-11 10:04:28 +08:00
..
e2e Refactor web package and context package () 2023-06-18 09:59:09 +02:00
fuzz Move fuzz tests into tests/fuzz () 2023-01-09 15:30:14 +08:00
gitea-lfs-meta Test views of LFS files () 2022-12-23 07:41:56 +08:00
gitea-repositories-meta Fix bug of branches API with tests () 2023-07-01 10:52:52 +08:00
integration Fix the error message when the token is incorrect () 2023-07-11 10:04:28 +08:00
mssql.ini.tmpl Implement actions artifacts () 2023-05-19 21:37:57 +08:00
mysql.ini.tmpl Implement actions artifacts () 2023-05-19 21:37:57 +08:00
mysql8.ini.tmpl Implement actions artifacts () 2023-05-19 21:37:57 +08:00
pgsql.ini.tmpl Implement actions artifacts () 2023-05-19 21:37:57 +08:00
sqlite.ini.tmpl Implement actions artifacts () 2023-05-19 21:37:57 +08:00
test_utils.go Replace interface{} with any () 2023-07-04 18:36:08 +00:00