mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 16:58:37 +00:00
Use test context in tests and new loop system in benchmarks (#33648)
Replace all contexts in tests with go1.24 t.Context() --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -53,7 +52,7 @@ func testMirrorPush(t *testing.T, u *url.URL) {
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, mirrors, 1)
|
||||
|
||||
ok := mirror_service.SyncPushMirror(context.Background(), mirrors[0].ID)
|
||||
ok := mirror_service.SyncPushMirror(t.Context(), mirrors[0].ID)
|
||||
assert.True(t, ok)
|
||||
|
||||
srcGitRepo, err := gitrepo.OpenRepository(git.DefaultContext, srcRepo)
|
||||
|
Reference in New Issue
Block a user