diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-09-06 20:08:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 12:08:51 +0000 |
commit | b9df9fa2e22d0bbf66a549183749b9dfaca6bd2f (patch) | |
tree | 2746f647c6d5f616afa5fc9acd2103e7091cb1ff /tests/integration/mirror_push_test.go | |
parent | b3d88ada01c5bafe0581dc129fabe35a6faa3a85 (diff) | |
download | gitea-b9df9fa2e22d0bbf66a549183749b9dfaca6bd2f.tar.gz gitea-b9df9fa2e22d0bbf66a549183749b9dfaca6bd2f.zip |
Move createrepository from module to service layer (#26927)
Repository creation depends on many models, so moving it to service
layer is better.
Diffstat (limited to 'tests/integration/mirror_push_test.go')
-rw-r--r-- | tests/integration/mirror_push_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/mirror_push_test.go b/tests/integration/mirror_push_test.go index 9abae63b0a..ab79db1861 100644 --- a/tests/integration/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -17,10 +17,10 @@ import ( user_model "code.gitea.io/gitea/models/user" gitea_context "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/services/migrations" mirror_service "code.gitea.io/gitea/services/mirror" + repo_service "code.gitea.io/gitea/services/repository" "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" @@ -39,7 +39,7 @@ func testMirrorPush(t *testing.T, u *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) srcRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) - mirrorRepo, err := repository.CreateRepository(user, user, repository.CreateRepoOptions{ + mirrorRepo, err := repo_service.CreateRepositoryDirectly(user, user, repo_service.CreateRepoOptions{ Name: "test-push-mirror", }) assert.NoError(t, err) |