mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28: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"
|
||||
"strings"
|
||||
@@ -143,7 +142,7 @@ func TestLFSLockView(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
// make sure the display names are different, or the test is meaningless
|
||||
require.NoError(t, repo3.LoadOwner(context.Background()))
|
||||
require.NoError(t, repo3.LoadOwner(t.Context()))
|
||||
require.NotEqual(t, user2.DisplayName(), repo3.Owner.DisplayName())
|
||||
|
||||
req := NewRequest(t, "GET", fmt.Sprintf("/%s/settings/lfs/locks", repo3.FullName()))
|
||||
|
Reference in New Issue
Block a user