summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-12-12 23:48:20 +0800
committerGitHub <noreply@github.com>2021-12-12 23:48:20 +0800
commit572324049008ac803d3d7c17a7b3a81ef00386fc (patch)
treea9c3709643a23165d27aa67e76f10f26a89936d5 /integrations
parent0a7e8327a017c5dd43e552bbcd0d0f056bc1671b (diff)
downloadgitea-572324049008ac803d3d7c17a7b3a81ef00386fc.tar.gz
gitea-572324049008ac803d3d7c17a7b3a81ef00386fc.zip
Some repository refactors (#17950)
* some repository refactors * remove unnecessary code * Fix test * Remove unnecessary banner
Diffstat (limited to 'integrations')
-rw-r--r--integrations/delete_user_test.go2
-rw-r--r--integrations/pull_update_test.go2
-rw-r--r--integrations/repo_watch_test.go6
3 files changed, 5 insertions, 5 deletions
diff --git a/integrations/delete_user_test.go b/integrations/delete_user_test.go
index 8eb4f45fa1..e44d2e7bd3 100644
--- a/integrations/delete_user_test.go
+++ b/integrations/delete_user_test.go
@@ -24,7 +24,7 @@ func assertUserDeleted(t *testing.T, userID int64) {
unittest.AssertNotExistsBean(t, &models.OrgUser{UID: userID})
unittest.AssertNotExistsBean(t, &models.IssueUser{UID: userID})
unittest.AssertNotExistsBean(t, &models.TeamUser{UID: userID})
- unittest.AssertNotExistsBean(t, &models.Star{UID: userID})
+ unittest.AssertNotExistsBean(t, &repo_model.Star{UID: userID})
}
func TestUserDeleteAccount(t *testing.T) {
diff --git a/integrations/pull_update_test.go b/integrations/pull_update_test.go
index e5e19475ca..ede0cc9896 100644
--- a/integrations/pull_update_test.go
+++ b/integrations/pull_update_test.go
@@ -89,7 +89,7 @@ func createOutdatedPR(t *testing.T, actor, forkOrg *user_model.User) *models.Pul
assert.NoError(t, err)
assert.NotEmpty(t, baseRepo)
- headRepo, err := repo_service.ForkRepository(actor, forkOrg, models.ForkRepoOptions{
+ headRepo, err := repo_service.ForkRepository(actor, forkOrg, repo_service.ForkRepoOptions{
BaseRepo: baseRepo,
Name: "repo-pr-update",
Description: "desc",
diff --git a/integrations/repo_watch_test.go b/integrations/repo_watch_test.go
index 6ff189975b..2ff3b26361 100644
--- a/integrations/repo_watch_test.go
+++ b/integrations/repo_watch_test.go
@@ -8,7 +8,7 @@ import (
"net/url"
"testing"
- "code.gitea.io/gitea/models"
+ repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/setting"
)
@@ -18,8 +18,8 @@ func TestRepoWatch(t *testing.T) {
// Test round-trip auto-watch
setting.Service.AutoWatchOnChanges = true
session := loginUser(t, "user2")
- unittest.AssertNotExistsBean(t, &models.Watch{UserID: 2, RepoID: 3})
+ unittest.AssertNotExistsBean(t, &repo_model.Watch{UserID: 2, RepoID: 3})
testEditFile(t, session, "user3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n")
- unittest.AssertExistsAndLoadBean(t, &models.Watch{UserID: 2, RepoID: 3, Mode: models.RepoWatchModeAuto})
+ unittest.AssertExistsAndLoadBean(t, &repo_model.Watch{UserID: 2, RepoID: 3, Mode: repo_model.WatchModeAuto})
})
}