diff options
author | Zoupers Zou <1171443643@qq.com> | 2024-06-12 06:22:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 22:22:28 +0000 |
commit | e25d6960b5749fbf7f88ebb6b27878c0459817da (patch) | |
tree | 5d5b583916f57cdc000d86be8be2a446c428c7d1 /tests/integration/api_repo_lfs_locks_test.go | |
parent | fc2d75f86d77b022ece848acf2581c14ef21d43b (diff) | |
download | gitea-e25d6960b5749fbf7f88ebb6b27878c0459817da.tar.gz gitea-e25d6960b5749fbf7f88ebb6b27878c0459817da.zip |
Fix #31185 try fix lfs download from bitbucket failed (#31201)
Fix #31185
Diffstat (limited to 'tests/integration/api_repo_lfs_locks_test.go')
-rw-r--r-- | tests/integration/api_repo_lfs_locks_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/integration/api_repo_lfs_locks_test.go b/tests/integration/api_repo_lfs_locks_test.go index 5aa1396941..427e0b9fb1 100644 --- a/tests/integration/api_repo_lfs_locks_test.go +++ b/tests/integration/api_repo_lfs_locks_test.go @@ -105,7 +105,7 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range tests { session := loginUser(t, test.user.Name) req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks", test.repo.FullName()), map[string]string{"path": test.path}) - req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Accept", lfs.AcceptHeader) req.Header.Set("Content-Type", lfs.MediaType) resp := session.MakeRequest(t, req, test.httpResult) if len(test.addTime) > 0 { @@ -123,7 +123,7 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range resultsTests { session := loginUser(t, test.user.Name) req := NewRequestf(t, "GET", "/%s.git/info/lfs/locks", test.repo.FullName()) - req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Accept", lfs.AcceptHeader) resp := session.MakeRequest(t, req, http.StatusOK) var lfsLocks api.LFSLockList DecodeJSON(t, resp, &lfsLocks) @@ -135,7 +135,7 @@ func TestAPILFSLocksLogged(t *testing.T) { } req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks/verify", test.repo.FullName()), map[string]string{}) - req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Accept", lfs.AcceptHeader) req.Header.Set("Content-Type", lfs.MediaType) resp = session.MakeRequest(t, req, http.StatusOK) var lfsLocksVerify api.LFSLockListVerify @@ -159,7 +159,7 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range deleteTests { session := loginUser(t, test.user.Name) req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks/%s/unlock", test.repo.FullName(), test.lockID), map[string]string{}) - req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Accept", lfs.AcceptHeader) req.Header.Set("Content-Type", lfs.MediaType) resp := session.MakeRequest(t, req, http.StatusOK) var lfsLockRep api.LFSLockResponse @@ -172,7 +172,7 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range resultsTests { session := loginUser(t, test.user.Name) req := NewRequestf(t, "GET", "/%s.git/info/lfs/locks", test.repo.FullName()) - req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Accept", lfs.AcceptHeader) resp := session.MakeRequest(t, req, http.StatusOK) var lfsLocks api.LFSLockList DecodeJSON(t, resp, &lfsLocks) |