diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-04-08 12:22:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 06:22:10 +0200 |
commit | 3c3d49899f0f7206e190bdeecdc4da248cc7e686 (patch) | |
tree | 7d1f57f7655142b47b5adeb197943c74c1e6f8c9 /integrations/integration_test.go | |
parent | 75f8534c3a8678f4b55e557960450230cf909b93 (diff) | |
download | gitea-3c3d49899f0f7206e190bdeecdc4da248cc7e686.tar.gz gitea-3c3d49899f0f7206e190bdeecdc4da248cc7e686.zip |
Remove dependent on session auth for api/v1 routers (#19321)
* Remove dependent on session auth for api/v1 routers
* Remove unnecessary session on API context
* remove missed header
* fix test
* fix missed api/v1
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r-- | integrations/integration_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 9e0445cae7..e7ceb33e96 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -359,6 +359,10 @@ func emptyTestSession(t testing.TB) *TestSession { return &TestSession{jar: jar} } +func getUserToken(t testing.TB, userName string) string { + return getTokenForLoggedInUser(t, loginUser(t, userName)) +} + func loginUser(t testing.TB, userName string) *TestSession { t.Helper() if session, ok := loginSessionCache[userName]; ok { |