[TESTS] Move CreateDeclarativeRepo
to more accessible location
- This allows `CreateDeclarativeRepo` to be used by other testing packages such as E2EE testing. - Removes unused function in `services/webhook/sourcehut/builds_test.go`.
This commit is contained in:
parent
78e4736db6
commit
f78e397dd6
32 changed files with 196 additions and 258 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
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"
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -83,7 +84,7 @@ func TestAPIPullUpdateByRebase(t *testing.T) {
|
|||
}
|
||||
|
||||
func createOutdatedPR(t *testing.T, actor, forkOrg *user_model.User) *issues_model.PullRequest {
|
||||
baseRepo, _, _ := CreateDeclarativeRepo(t, actor, "repo-pr-update", nil, nil, nil)
|
||||
baseRepo, _, _ := tests.CreateDeclarativeRepo(t, actor, "repo-pr-update", nil, nil, nil)
|
||||
|
||||
headRepo, err := repo_service.ForkRepositoryAndUpdates(git.DefaultContext, actor, forkOrg, repo_service.ForkRepoOptions{
|
||||
BaseRepo: baseRepo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue