aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_keys_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-12-10 09:27:50 +0800
committerGitHub <noreply@github.com>2021-12-10 09:27:50 +0800
commit719bddcd76610a63dadc8555760072957a11cf30 (patch)
tree0df26092fba7e3e21444fe493e6b349473b6b0cb /integrations/api_keys_test.go
parentfb8166c6c6b652a0e6fa98681780a6a71090faf3 (diff)
downloadgitea-719bddcd76610a63dadc8555760072957a11cf30.tar.gz
gitea-719bddcd76610a63dadc8555760072957a11cf30.zip
Move repository model into models/repo (#17933)
* Some refactors related repository model * Move more methods out of repository * Move repository into models/repo * Fix test * Fix test * some improvements * Remove unnecessary function
Diffstat (limited to 'integrations/api_keys_test.go')
-rw-r--r--integrations/api_keys_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/api_keys_test.go b/integrations/api_keys_test.go
index 9bcfa70461..5fbd51318f 100644
--- a/integrations/api_keys_test.go
+++ b/integrations/api_keys_test.go
@@ -12,6 +12,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/perm"
+ repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
@@ -48,7 +49,7 @@ func TestDeleteDeployKeyNoLogin(t *testing.T) {
func TestCreateReadOnlyDeployKey(t *testing.T) {
defer prepareTestEnv(t)()
- repo := unittest.AssertExistsAndLoadBean(t, &models.Repository{Name: "repo1"}).(*models.Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: "repo1"}).(*repo_model.Repository)
repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}).(*user_model.User)
session := loginUser(t, repoOwner.Name)
@@ -74,7 +75,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) {
func TestCreateReadWriteDeployKey(t *testing.T) {
defer prepareTestEnv(t)()
- repo := unittest.AssertExistsAndLoadBean(t, &models.Repository{Name: "repo1"}).(*models.Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: "repo1"}).(*repo_model.Repository)
repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}).(*user_model.User)
session := loginUser(t, repoOwner.Name)