forked from forgejo/forgejo
Make git.OpenRepository accept Context (#19260)
* OpenRepositoryCtx -> OpenRepository * OpenRepository -> openRepositoryWithDefaultContext, only for internal usage
This commit is contained in:
parent
889a8c268c
commit
3e88af898a
89 changed files with 176 additions and 170 deletions
|
@ -5,6 +5,7 @@
|
|||
package integrations
|
||||
|
||||
import (
|
||||
stdCtx "context"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
@ -134,7 +135,7 @@ func TestAPIUpdateFile(t *testing.T) {
|
|||
url := fmt.Sprintf("/api/v1/repos/%s/%s/contents/%s?token=%s", user2.Name, repo1.Name, treePath, token2)
|
||||
req := NewRequestWithJSON(t, "PUT", url, &updateFileOptions)
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
gitRepo, _ := git.OpenRepository(repo1.RepoPath())
|
||||
gitRepo, _ := git.OpenRepository(stdCtx.Background(), repo1.RepoPath())
|
||||
commitID, _ := gitRepo.GetBranchCommitID(updateFileOptions.NewBranchName)
|
||||
expectedFileResponse := getExpectedFileResponseForUpdate(commitID, treePath)
|
||||
var fileResponse api.FileResponse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue