mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-19 23:38:29 +02:00
lint
This commit is contained in:
parent
35d85dcf09
commit
fe6f0f97f8
@ -4,7 +4,6 @@
|
|||||||
package integration
|
package integration
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
@ -325,7 +324,7 @@ func getExpectedFileResponseForRepoFilesUpdateRename(commitID, lastCommitSHA str
|
|||||||
for _, detail := range details {
|
for _, detail := range details {
|
||||||
encoding := "base64"
|
encoding := "base64"
|
||||||
content := detail["content"].(string)
|
content := detail["content"].(string)
|
||||||
selfUrl := setting.AppURL + "api/v1/repos/user2/lfs/contents/" + detail["filename"].(string) + "?ref=master"
|
selfURL := setting.AppURL + "api/v1/repos/user2/lfs/contents/" + detail["filename"].(string) + "?ref=master"
|
||||||
htmlURL := setting.AppURL + "user2/lfs/src/branch/master/" + detail["filename"].(string)
|
htmlURL := setting.AppURL + "user2/lfs/src/branch/master/" + detail["filename"].(string)
|
||||||
gitURL := setting.AppURL + "api/v1/repos/user2/lfs/git/blobs/" + detail["sha"].(string)
|
gitURL := setting.AppURL + "api/v1/repos/user2/lfs/git/blobs/" + detail["sha"].(string)
|
||||||
downloadURL := setting.AppURL + "user2/lfs/raw/branch/master/" + detail["filename"].(string)
|
downloadURL := setting.AppURL + "user2/lfs/raw/branch/master/" + detail["filename"].(string)
|
||||||
@ -341,12 +340,12 @@ func getExpectedFileResponseForRepoFilesUpdateRename(commitID, lastCommitSHA str
|
|||||||
Size: int64(detail["size"].(int)),
|
Size: int64(detail["size"].(int)),
|
||||||
Encoding: &encoding,
|
Encoding: &encoding,
|
||||||
Content: &content,
|
Content: &content,
|
||||||
URL: &selfUrl,
|
URL: &selfURL,
|
||||||
HTMLURL: &htmlURL,
|
HTMLURL: &htmlURL,
|
||||||
GitURL: &gitURL,
|
GitURL: &gitURL,
|
||||||
DownloadURL: &downloadURL,
|
DownloadURL: &downloadURL,
|
||||||
Links: &api.FileLinksResponse{
|
Links: &api.FileLinksResponse{
|
||||||
Self: &selfUrl,
|
Self: &selfURL,
|
||||||
GitURL: &gitURL,
|
GitURL: &gitURL,
|
||||||
HTMLURL: &htmlURL,
|
HTMLURL: &htmlURL,
|
||||||
},
|
},
|
||||||
@ -533,8 +532,6 @@ func TestChangeRepoFilesForUpdateWithFileRename(t *testing.T) {
|
|||||||
|
|
||||||
// test
|
// test
|
||||||
filesResponse, err := files_service.ChangeRepoFiles(git.DefaultContext, repo, doer, opts)
|
filesResponse, err := files_service.ChangeRepoFiles(git.DefaultContext, repo, doer, opts)
|
||||||
a, _ := json.MarshalIndent(filesResponse, "", " ")
|
|
||||||
fmt.Println(string(a))
|
|
||||||
|
|
||||||
// asserts
|
// asserts
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user