diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2018-01-27 17:48:15 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-01-27 18:48:15 +0200 |
commit | 9e842c8a722eb1db50cfbdbe7146b67d3670052f (patch) | |
tree | d0d1f06f9363276289971759c7134149b9ec6860 /integrations/api_repo_lfs_locks_test.go | |
parent | 97fe773491ae69531141316a1178d22c8a5d1257 (diff) | |
download | gitea-9e842c8a722eb1db50cfbdbe7146b67d3670052f.tar.gz gitea-9e842c8a722eb1db50cfbdbe7146b67d3670052f.zip |
Fix SSH auth lfs locks (#3152)
* Fix SSH auth LFS locks
* Activate SSH/lock test
* Remove debug
* Follow @lunny recommendation for AfterLoad method
Diffstat (limited to 'integrations/api_repo_lfs_locks_test.go')
-rw-r--r-- | integrations/api_repo_lfs_locks_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/integrations/api_repo_lfs_locks_test.go b/integrations/api_repo_lfs_locks_test.go index 61e554634c..35b26e45ab 100644 --- a/integrations/api_repo_lfs_locks_test.go +++ b/integrations/api_repo_lfs_locks_test.go @@ -41,10 +41,10 @@ func TestAPILFSLocksNotLogin(t *testing.T) { req := NewRequestf(t, "GET", "/%s/%s.git/info/lfs/locks", user.Name, repo.Name) req.Header.Set("Accept", "application/vnd.git-lfs+json") - resp := MakeRequest(t, req, http.StatusForbidden) + resp := MakeRequest(t, req, http.StatusUnauthorized) var lfsLockError api.LFSLockError DecodeJSON(t, resp, &lfsLockError) - assert.Equal(t, "You must have pull access to list locks : User undefined doesn't have rigth to list for lfs lock [rid: 1]", lfsLockError.Message) + assert.Equal(t, "Unauthorized", lfsLockError.Message) } func TestAPILFSLocksLogged(t *testing.T) { @@ -68,8 +68,8 @@ func TestAPILFSLocksLogged(t *testing.T) { {user: user2, repo: repo1, path: "path/test", httpResult: http.StatusConflict}, {user: user2, repo: repo1, path: "Foo/BaR.zip", httpResult: http.StatusConflict}, {user: user2, repo: repo1, path: "Foo/Test/../subFOlder/../Relative/../BaR.zip", httpResult: http.StatusConflict}, - {user: user4, repo: repo1, path: "FoO/BaR.zip", httpResult: http.StatusForbidden}, - {user: user4, repo: repo1, path: "path/test-user4", httpResult: http.StatusForbidden}, + {user: user4, repo: repo1, path: "FoO/BaR.zip", httpResult: http.StatusUnauthorized}, + {user: user4, repo: repo1, path: "path/test-user4", httpResult: http.StatusUnauthorized}, {user: user2, repo: repo1, path: "patH/Test-user4", httpResult: http.StatusCreated, addTime: []int{0}}, {user: user2, repo: repo1, path: "some/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/path", httpResult: http.StatusCreated, addTime: []int{0}}, |