summaryrefslogtreecommitdiffstats
path: root/integrations/pull_update_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-24 15:56:24 +0800
committerGitHub <noreply@github.com>2021-11-24 15:56:24 +0800
commitc97d66d23cf14e88514cccb88c393d21db51ab7a (patch)
tree625857bea77befb61847c01bf17aac1177255787 /integrations/pull_update_test.go
parent754fdd8f9c2b1e4e78d507fd414968334cf586fd (diff)
downloadgitea-c97d66d23cf14e88514cccb88c393d21db51ab7a.tar.gz
gitea-c97d66d23cf14e88514cccb88c393d21db51ab7a.zip
Move repofiles from modules/repofiles to services/repository/files (#17774)
* Move repofiles from modules to services * rename services/repository/repofiles -> services/repository/files * Fix test Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'integrations/pull_update_test.go')
-rw-r--r--integrations/pull_update_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/integrations/pull_update_test.go b/integrations/pull_update_test.go
index 43cfe7debf..d7ea676b79 100644
--- a/integrations/pull_update_test.go
+++ b/integrations/pull_update_test.go
@@ -12,9 +12,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
- "code.gitea.io/gitea/modules/repofiles"
pull_service "code.gitea.io/gitea/services/pull"
repo_service "code.gitea.io/gitea/services/repository"
+ files_service "code.gitea.io/gitea/services/repository/files"
"github.com/stretchr/testify/assert"
)
@@ -97,22 +97,22 @@ func createOutdatedPR(t *testing.T, actor, forkOrg *models.User) *models.PullReq
assert.NotEmpty(t, headRepo)
//create a commit on base Repo
- _, err = repofiles.CreateOrUpdateRepoFile(baseRepo, actor, &repofiles.UpdateRepoFileOptions{
+ _, err = files_service.CreateOrUpdateRepoFile(baseRepo, actor, &files_service.UpdateRepoFileOptions{
TreePath: "File_A",
Message: "Add File A",
Content: "File A",
IsNewFile: true,
OldBranch: "master",
NewBranch: "master",
- Author: &repofiles.IdentityOptions{
+ Author: &files_service.IdentityOptions{
Name: actor.Name,
Email: actor.Email,
},
- Committer: &repofiles.IdentityOptions{
+ Committer: &files_service.IdentityOptions{
Name: actor.Name,
Email: actor.Email,
},
- Dates: &repofiles.CommitDateOptions{
+ Dates: &files_service.CommitDateOptions{
Author: time.Now(),
Committer: time.Now(),
},
@@ -120,22 +120,22 @@ func createOutdatedPR(t *testing.T, actor, forkOrg *models.User) *models.PullReq
assert.NoError(t, err)
//create a commit on head Repo
- _, err = repofiles.CreateOrUpdateRepoFile(headRepo, actor, &repofiles.UpdateRepoFileOptions{
+ _, err = files_service.CreateOrUpdateRepoFile(headRepo, actor, &files_service.UpdateRepoFileOptions{
TreePath: "File_B",
Message: "Add File on PR branch",
Content: "File B",
IsNewFile: true,
OldBranch: "master",
NewBranch: "newBranch",
- Author: &repofiles.IdentityOptions{
+ Author: &files_service.IdentityOptions{
Name: actor.Name,
Email: actor.Email,
},
- Committer: &repofiles.IdentityOptions{
+ Committer: &files_service.IdentityOptions{
Name: actor.Name,
Email: actor.Email,
},
- Dates: &repofiles.CommitDateOptions{
+ Dates: &files_service.CommitDateOptions{
Author: time.Now(),
Committer: time.Now(),
},