summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-17 23:17:31 +0800
committerGitHub <noreply@github.com>2021-11-17 23:17:31 +0800
commit5233051e64e90238bb7b6ddf9ecd1513e57bf8e9 (patch)
tree6e21565fd47954877bc14fd66f57d798c86e3300 /integrations
parent750a8465f547e9f08a87612c75898d56b8ec1f88 (diff)
downloadgitea-5233051e64e90238bb7b6ddf9ecd1513e57bf8e9.tar.gz
gitea-5233051e64e90238bb7b6ddf9ecd1513e57bf8e9.zip
Move some functions into services/repository (#17677)
Diffstat (limited to 'integrations')
-rw-r--r--integrations/api_repo_get_contents_list_test.go4
-rw-r--r--integrations/api_repo_get_contents_test.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/integrations/api_repo_get_contents_list_test.go b/integrations/api_repo_get_contents_list_test.go
index c35a345e81..823a72c726 100644
--- a/integrations/api_repo_get_contents_list_test.go
+++ b/integrations/api_repo_get_contents_list_test.go
@@ -13,9 +13,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/git"
- repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
+ repo_service "code.gitea.io/gitea/services/repository"
"github.com/stretchr/testify/assert"
)
@@ -72,7 +72,7 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) {
// Make a new branch in repo1
newBranch := "test_branch"
- err := repo_module.CreateNewBranch(user2, repo1, repo1.DefaultBranch, newBranch)
+ err := repo_service.CreateNewBranch(user2, repo1, repo1.DefaultBranch, newBranch)
assert.NoError(t, err)
// Get the commit ID of the default branch
gitRepo, err := git.OpenRepository(repo1.RepoPath())
diff --git a/integrations/api_repo_get_contents_test.go b/integrations/api_repo_get_contents_test.go
index 243ee229dc..67ec02b7b0 100644
--- a/integrations/api_repo_get_contents_test.go
+++ b/integrations/api_repo_get_contents_test.go
@@ -12,9 +12,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/git"
- repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
+ repo_service "code.gitea.io/gitea/services/repository"
"github.com/stretchr/testify/assert"
)
@@ -73,7 +73,7 @@ func testAPIGetContents(t *testing.T, u *url.URL) {
// Make a new branch in repo1
newBranch := "test_branch"
- err := repo_module.CreateNewBranch(user2, repo1, repo1.DefaultBranch, newBranch)
+ err := repo_service.CreateNewBranch(user2, repo1, repo1.DefaultBranch, newBranch)
assert.NoError(t, err)
// Get the commit ID of the default branch
gitRepo, err := git.OpenRepository(repo1.RepoPath())