summaryrefslogtreecommitdiffstats
path: root/integrations/git_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-28 19:58:28 +0800
committerGitHub <noreply@github.com>2021-11-28 12:58:28 +0100
commit1fee11d69a437ec7e68b3f6b645827592fe77292 (patch)
tree1fca452f96746d9f7cc8c31723e3c365155cf96d /integrations/git_test.go
parent24a8d54bfb908a2371cb808a5243b3290dd0664a (diff)
downloadgitea-1fee11d69a437ec7e68b3f6b645827592fe77292.tar.gz
gitea-1fee11d69a437ec7e68b3f6b645827592fe77292.zip
Move accessmode into models/perm (#17828)
Diffstat (limited to 'integrations/git_test.go')
-rw-r--r--integrations/git_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/git_test.go b/integrations/git_test.go
index 71e3476abb..642c1f1223 100644
--- a/integrations/git_test.go
+++ b/integrations/git_test.go
@@ -18,6 +18,7 @@ import (
"time"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/perm"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/git"
@@ -58,7 +59,7 @@ func testGit(t *testing.T, u *url.URL) {
defer util.RemoveAll(dstPath)
t.Run("CreateRepoInDifferentUser", doAPICreateRepository(forkedUserCtx, false))
- t.Run("AddUserAsCollaborator", doAPIAddCollaborator(forkedUserCtx, httpContext.Username, models.AccessModeRead))
+ t.Run("AddUserAsCollaborator", doAPIAddCollaborator(forkedUserCtx, httpContext.Username, perm.AccessModeRead))
t.Run("ForkFromDifferentUser", doAPIForkRepository(httpContext, forkedUserCtx.Username))
@@ -91,7 +92,7 @@ func testGit(t *testing.T, u *url.URL) {
keyname := "my-testing-key"
forkedUserCtx.Reponame = sshContext.Reponame
t.Run("CreateRepoInDifferentUser", doAPICreateRepository(forkedUserCtx, false))
- t.Run("AddUserAsCollaborator", doAPIAddCollaborator(forkedUserCtx, sshContext.Username, models.AccessModeRead))
+ t.Run("AddUserAsCollaborator", doAPIAddCollaborator(forkedUserCtx, sshContext.Username, perm.AccessModeRead))
t.Run("ForkFromDifferentUser", doAPIForkRepository(sshContext, forkedUserCtx.Username))
//Setup key the user ssh key