From e13da8aae326136c9f3e73324e4da144adaae0f7 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sat, 11 Oct 2025 12:14:13 +0200 Subject: [PATCH] chore: remove branding from application run helper (#9640) Rel: https://codeberg.org/forgejo/forgejo/pulls/9628. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9640 Reviewed-by: Michael Kriese --- .../integration/actions_commit_status_test.go | 2 +- .../actions_concurrency_group_queue_test.go | 2 +- tests/integration/actions_job_test.go | 8 ++--- tests/integration/actions_log_test.go | 2 +- .../integration/actions_notifications_test.go | 2 +- tests/integration/actions_route_test.go | 4 +-- .../actions_run_now_done_notification_test.go | 2 +- tests/integration/actions_trigger_test.go | 14 ++++---- tests/integration/actions_view_test.go | 2 +- tests/integration/activitypub_client_test.go | 2 +- .../integration/api_activitypub_actor_test.go | 2 +- ...pi_activitypub_person_inbox_follow_test.go | 2 +- ...ivitypub_person_inbox_useractivity_test.go | 2 +- .../api_activitypub_person_test.go | 6 ++-- .../api_activitypub_repository_test.go | 6 ++-- tests/integration/api_branch_test.go | 6 ++-- .../api_federation_httpsig_test.go | 2 +- tests/integration/api_issue_templates_test.go | 2 +- tests/integration/api_packages_cargo_test.go | 4 +-- tests/integration/api_private_serv_test.go | 6 ++-- tests/integration/api_pull_test.go | 2 +- tests/integration/api_push_mirror_test.go | 6 ++-- tests/integration/api_quota_use_test.go | 12 +++---- tests/integration/api_repo_actions_test.go | 2 +- tests/integration/api_repo_branch_test.go | 2 +- .../integration/api_repo_collaborator_test.go | 2 +- tests/integration/api_repo_compare_test.go | 2 +- .../integration/api_repo_file_create_test.go | 6 ++-- .../integration/api_repo_file_delete_test.go | 2 +- tests/integration/api_repo_file_get_test.go | 2 +- .../integration/api_repo_file_update_test.go | 2 +- .../integration/api_repo_files_change_test.go | 2 +- .../api_repo_get_contents_list_test.go | 2 +- .../integration/api_repo_get_contents_test.go | 4 +-- tests/integration/api_repo_git_notes_test.go | 6 ++-- tests/integration/api_repo_languages_test.go | 2 +- tests/integration/api_repo_test.go | 4 +-- tests/integration/api_wiki_test.go | 2 +- .../archived_labels_display_test.go | 2 +- tests/integration/benchmarks_test.go | 2 +- tests/integration/branches_test.go | 2 +- tests/integration/cmd_admin_test.go | 6 ++-- tests/integration/cmd_forgejo_actions_test.go | 2 +- tests/integration/cmd_keys_test.go | 2 +- tests/integration/codeowner_test.go | 2 +- tests/integration/comment_roles_test.go | 4 +-- tests/integration/compare_test.go | 8 ++--- tests/integration/dump_restore_test.go | 2 +- tests/integration/editor_test.go | 8 ++--- tests/integration/forgejo_git_test.go | 2 +- .../git_helper_for_declarative_test.go | 2 +- tests/integration/git_push_test.go | 4 +-- tests/integration/git_smart_http_test.go | 2 +- tests/integration/git_test.go | 6 ++-- tests/integration/issue_subscribe_test.go | 2 +- tests/integration/issue_test.go | 4 +-- tests/integration/linguist_test.go | 2 +- tests/integration/migrate_test.go | 6 ++-- tests/integration/mirror_push_test.go | 14 ++++---- tests/integration/new_org_test.go | 2 +- tests/integration/oauth_test.go | 2 +- tests/integration/org_count_test.go | 2 +- tests/integration/org_profile_test.go | 2 +- tests/integration/patch_status_test.go | 2 +- tests/integration/proctected_branch_test.go | 2 +- tests/integration/pull_commit_test.go | 2 +- tests/integration/pull_create_test.go | 14 ++++---- tests/integration/pull_diff_test.go | 2 +- tests/integration/pull_icon_test.go | 2 +- tests/integration/pull_merge_test.go | 36 +++++++++---------- tests/integration/pull_reopen_test.go | 2 +- tests/integration/pull_review_test.go | 10 +++--- tests/integration/pull_status_test.go | 6 ++-- tests/integration/pull_summary_test.go | 2 +- tests/integration/pull_update_test.go | 12 +++---- tests/integration/pull_wip_convert_test.go | 2 +- tests/integration/quota_use_test.go | 24 ++++++------- tests/integration/rename_branch_test.go | 2 +- tests/integration/repo_activity_test.go | 2 +- tests/integration/repo_archive_test.go | 2 +- tests/integration/repo_archive_text_test.go | 2 +- tests/integration/repo_badges_test.go | 2 +- tests/integration/repo_branch_test.go | 6 ++-- tests/integration/repo_citation_test.go | 2 +- tests/integration/repo_fork_test.go | 6 ++-- tests/integration/repo_generate_test.go | 2 +- tests/integration/repo_git_note_test.go | 4 +-- tests/integration/repo_issue_title_test.go | 2 +- .../repo_migrate_credentials_test.go | 2 +- tests/integration/repo_sync_fork_test.go | 8 ++--- tests/integration/repo_tag_test.go | 6 ++-- tests/integration/repo_test.go | 6 ++-- tests/integration/repo_view_test.go | 4 +-- tests/integration/repo_watch_test.go | 2 +- tests/integration/repofiles_change_test.go | 4 +-- tests/integration/signing_git_test.go | 2 +- tests/integration/ssh_key_test.go | 4 +-- tests/integration/translations_test.go | 2 +- tests/integration/user_dashboard_test.go | 6 ++-- tests/integration/user_profile_test.go | 2 +- tests/integration/view_test.go | 4 +-- tests/integration/webhook_test.go | 2 +- tests/integration/wiki_test.go | 2 +- 103 files changed, 219 insertions(+), 219 deletions(-) diff --git a/tests/integration/actions_commit_status_test.go b/tests/integration/actions_commit_status_test.go index 5667bdadd5..05de90e5ab 100644 --- a/tests/integration/actions_commit_status_test.go +++ b/tests/integration/actions_commit_status_test.go @@ -25,7 +25,7 @@ import ( ) func TestActionsAutomerge(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Actions.Enabled, true)() ctx := db.DefaultContext diff --git a/tests/integration/actions_concurrency_group_queue_test.go b/tests/integration/actions_concurrency_group_queue_test.go index 1780b1ad70..72520d43b1 100644 --- a/tests/integration/actions_concurrency_group_queue_test.go +++ b/tests/integration/actions_concurrency_group_queue_test.go @@ -215,7 +215,7 @@ func TestActionConcurrencyGroupQueueFetchNext(t *testing.T) { t.Skip() } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo diff --git a/tests/integration/actions_job_test.go b/tests/integration/actions_job_test.go index 04e2bc5f18..7e7cfd0a79 100644 --- a/tests/integration/actions_job_test.go +++ b/tests/integration/actions_job_test.go @@ -129,7 +129,7 @@ jobs: }, }, } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) @@ -179,7 +179,7 @@ func TestRunnerLifecycleGithubEndpoints(t *testing.T) { // registering a mock runner when using a database other than SQLite leaves leftovers t.Skip() } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) @@ -348,7 +348,7 @@ jobs: }, }, } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) @@ -394,7 +394,7 @@ func TestActionsGiteaContext(t *testing.T) { t.Skip() } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) user2Session := loginUser(t, user2.Name) user2Token := getTokenForLoggedInUser(t, user2Session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) diff --git a/tests/integration/actions_log_test.go b/tests/integration/actions_log_test.go index 0443dc9cfb..4da1114958 100644 --- a/tests/integration/actions_log_test.go +++ b/tests/integration/actions_log_test.go @@ -101,7 +101,7 @@ jobs: zstdEnabled: false, }, } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) diff --git a/tests/integration/actions_notifications_test.go b/tests/integration/actions_notifications_test.go index ed59c92500..78ab79e72f 100644 --- a/tests/integration/actions_notifications_test.go +++ b/tests/integration/actions_notifications_test.go @@ -59,7 +59,7 @@ jobs: notifyEmail: false, }, } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) diff --git a/tests/integration/actions_route_test.go b/tests/integration/actions_route_test.go index 930a917524..1218a1abed 100644 --- a/tests/integration/actions_route_test.go +++ b/tests/integration/actions_route_test.go @@ -32,7 +32,7 @@ func GetWorkflowRunRedirectURI(t *testing.T, repoURL, workflow string) string { } func TestActionsWebRouteLatestWorkflowRun(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo @@ -120,7 +120,7 @@ func TestActionsWebRouteLatestWorkflowRun(t *testing.T) { } func TestActionsWebRouteLatestRun(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo diff --git a/tests/integration/actions_run_now_done_notification_test.go b/tests/integration/actions_run_now_done_notification_test.go index 1f462a9874..9a2764594b 100644 --- a/tests/integration/actions_run_now_done_notification_test.go +++ b/tests/integration/actions_run_now_done_notification_test.go @@ -72,7 +72,7 @@ func TestActionNowDoneNotification(t *testing.T) { t.Skip() } - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { notifier := mockNotifier{t: t, testIdx: 0, lastRunID: -1, runID: -1} notify_service.RegisterNotifier(¬ifier) defer notify_service.UnregisterNotifier(¬ifier) diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index a1c5b90362..094ec9cfdd 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -40,7 +40,7 @@ import ( ) func TestActionsPullRequestCommitStatus(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the base repo session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteIssue) @@ -351,7 +351,7 @@ jobs: } func TestActionsPullRequestWithInvalidWorkflow(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the base repo session := loginUser(t, "user2") @@ -432,7 +432,7 @@ runs-on: docker } func TestActionsPullRequestTargetEvent(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the base repo org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the forked repo @@ -589,7 +589,7 @@ func TestActionsPullRequestTargetEvent(t *testing.T) { } func TestActionsSkipCI(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) @@ -680,7 +680,7 @@ func TestActionsSkipCI(t *testing.T) { } func TestActionsCreateDeleteRefEvent(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo @@ -796,7 +796,7 @@ func TestActionsCreateDeleteRefEvent(t *testing.T) { } func TestActionsWorkflowDispatchEvent(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo @@ -850,7 +850,7 @@ func TestActionsWorkflowDispatchEvent(t *testing.T) { } func TestActionsWorkflowDispatchConcurrencyGroup(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo diff --git a/tests/integration/actions_view_test.go b/tests/integration/actions_view_test.go index eb2faf02de..3b124beb65 100644 --- a/tests/integration/actions_view_test.go +++ b/tests/integration/actions_view_test.go @@ -24,7 +24,7 @@ import ( ) func TestActionViewsArtifactDeletion(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo diff --git a/tests/integration/activitypub_client_test.go b/tests/integration/activitypub_client_test.go index 67482a7277..9f0d277652 100644 --- a/tests/integration/activitypub_client_test.go +++ b/tests/integration/activitypub_client_test.go @@ -24,7 +24,7 @@ func TestActivityPubClientBodySize(t *testing.T) { defer test.MockVariableValue(&setting.Federation.Enabled, true)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) url := u.JoinPath("/api/v1/nodeinfo").String() diff --git a/tests/integration/api_activitypub_actor_test.go b/tests/integration/api_activitypub_actor_test.go index 42232bd640..90a759716a 100644 --- a/tests/integration/api_activitypub_actor_test.go +++ b/tests/integration/api_activitypub_actor_test.go @@ -56,7 +56,7 @@ func TestActorNewFromKeyId(t *testing.T) { defer test.MockVariableValue(&setting.Federation.Enabled, true)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { ctx, _ := contexttest.MockAPIContext(t, "/api/v1/activitypub/actor") sut, err := federation.NewActorIDFromKeyID(ctx.Base, fmt.Sprintf("%sapi/v1/activitypub/actor#main-key", u)) require.NoError(t, err) diff --git a/tests/integration/api_activitypub_person_inbox_follow_test.go b/tests/integration/api_activitypub_person_inbox_follow_test.go index f171b8951f..9e076ca002 100644 --- a/tests/integration/api_activitypub_person_inbox_follow_test.go +++ b/tests/integration/api_activitypub_person_inbox_follow_test.go @@ -35,7 +35,7 @@ func TestActivityPubPersonInboxFollow(t *testing.T) { federatedSrv := mock.DistantServer(t) defer federatedSrv.Close() - onGiteaRun(t, func(t *testing.T, localUrl *url.URL) { + onApplicationRun(t, func(t *testing.T, localUrl *url.URL) { defer test.MockVariableValue(&setting.AppURL, localUrl.String())() distantURL := federatedSrv.URL diff --git a/tests/integration/api_activitypub_person_inbox_useractivity_test.go b/tests/integration/api_activitypub_person_inbox_useractivity_test.go index 39f08f4d9c..4201fd94bf 100644 --- a/tests/integration/api_activitypub_person_inbox_useractivity_test.go +++ b/tests/integration/api_activitypub_person_inbox_useractivity_test.go @@ -37,7 +37,7 @@ func TestActivityPubPersonInboxNoteToDistant(t *testing.T) { federatedSrv := mock.DistantServer(t) defer federatedSrv.Close() - onGiteaRun(t, func(t *testing.T, localUrl *url.URL) { + onApplicationRun(t, func(t *testing.T, localUrl *url.URL) { defer test.MockVariableValue(&setting.AppURL, localUrl.String())() distantURL := federatedSrv.URL diff --git a/tests/integration/api_activitypub_person_test.go b/tests/integration/api_activitypub_person_test.go index bd21c13612..cbd1f99b23 100644 --- a/tests/integration/api_activitypub_person_test.go +++ b/tests/integration/api_activitypub_person_test.go @@ -32,7 +32,7 @@ func TestActivityPubPerson(t *testing.T) { federatedSrv := mock.DistantServer(t) defer federatedSrv.Close() - onGiteaRun(t, func(t *testing.T, localUrl *url.URL) { + onApplicationRun(t, func(t *testing.T, localUrl *url.URL) { defer test.MockVariableValue(&setting.AppURL, localUrl.String())() localUserID := 2 @@ -90,7 +90,7 @@ func TestActivityPubPersonInbox(t *testing.T) { defer test.MockVariableValue(&setting.Federation.Enabled, true)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.AppURL, u.String())() user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) @@ -117,7 +117,7 @@ func TestActivityPubPersonOutbox(t *testing.T) { federatedSrv := mock.DistantServer(t) defer federatedSrv.Close() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.AppURL, u.String())() user2outboxurl := u.JoinPath("/api/v1/activitypub/user-id/2/outbox").String() diff --git a/tests/integration/api_activitypub_repository_test.go b/tests/integration/api_activitypub_repository_test.go index b4be0407b9..29221bb682 100644 --- a/tests/integration/api_activitypub_repository_test.go +++ b/tests/integration/api_activitypub_repository_test.go @@ -32,7 +32,7 @@ func TestActivityPubRepository(t *testing.T) { federatedSrv := mock.DistantServer(t) defer federatedSrv.Close() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repositoryID := 2 localRepository := fmt.Sprintf("%sapi/v1/activitypub/repository-id/%d", u, repositoryID) @@ -76,7 +76,7 @@ func TestActivityPubRepositoryInboxValid(t *testing.T) { federatedSrv := mock.DistantServer(t) defer federatedSrv.Close() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repositoryID := 2 timeNow := time.Now().UTC() localRepoInbox := u.JoinPath(fmt.Sprintf("/api/v1/activitypub/repository-id/%d/inbox", repositoryID)).String() @@ -156,7 +156,7 @@ func TestActivityPubRepositoryInboxInvalid(t *testing.T) { defer test.MockVariableValue(&setting.Federation.SignatureEnforced, false)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { apServerActor := user.NewAPServerActor() repositoryID := 2 localRepo2Inbox := u.JoinPath(fmt.Sprintf("/api/v1/activitypub/repository-id/%d/inbox", repositoryID)).String() diff --git a/tests/integration/api_branch_test.go b/tests/integration/api_branch_test.go index d8800217d3..715c5b38cb 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -108,7 +108,7 @@ func TestAPIGetBranch(t *testing.T) { } func TestAPICreateBranch(t *testing.T) { - onGiteaRun(t, testAPICreateBranches) + onApplicationRun(t, testAPICreateBranches) } func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { @@ -189,7 +189,7 @@ func testAPICreateBranch(t testing.TB, session *TestSession, user, repo, oldBran } func TestAPIUpdateBranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, _ *url.URL) { + onApplicationRun(t, func(t *testing.T, _ *url.URL) { t.Run("UpdateBranchWithEmptyRepo", func(t *testing.T) { testAPIUpdateBranch(t, "user10", "repo6", "master", "test", http.StatusNotFound) }) @@ -265,7 +265,7 @@ func TestAPIBranchProtection(t *testing.T) { } func TestAPICreateBranchWithSyncBranches(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { unittest.AssertCount(t, &git_model.Branch{RepoID: 1}, 4) // make a broke repository with no branch on database diff --git a/tests/integration/api_federation_httpsig_test.go b/tests/integration/api_federation_httpsig_test.go index f5c4c78648..a194452dd2 100644 --- a/tests/integration/api_federation_httpsig_test.go +++ b/tests/integration/api_federation_httpsig_test.go @@ -28,7 +28,7 @@ func TestFederationHttpSigValidation(t *testing.T) { defer test.MockVariableValue(&setting.Federation.Enabled, true)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { userID := 2 userURL := fmt.Sprintf("%sapi/v1/activitypub/user-id/%d", u, userID) diff --git a/tests/integration/api_issue_templates_test.go b/tests/integration/api_issue_templates_test.go index 3d119c1157..23046543a3 100644 --- a/tests/integration/api_issue_templates_test.go +++ b/tests/integration/api_issue_templates_test.go @@ -20,7 +20,7 @@ import ( ) func TestAPIIssueTemplateList(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/tests/integration/api_packages_cargo_test.go b/tests/integration/api_packages_cargo_test.go index a86c2c64ad..febba37b76 100644 --- a/tests/integration/api_packages_cargo_test.go +++ b/tests/integration/api_packages_cargo_test.go @@ -31,7 +31,7 @@ import ( ) func TestPackageCargo(t *testing.T) { - onGiteaRun(t, testPackageCargo) + onApplicationRun(t, testPackageCargo) } func testPackageCargo(t *testing.T, _ *neturl.URL) { @@ -388,7 +388,7 @@ func testPackageCargo(t *testing.T, _ *neturl.URL) { } func TestRebuildCargo(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *neturl.URL) { + onApplicationRun(t, func(t *testing.T, u *neturl.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user.Name) unittest.AssertExistsIf(t, false, &repo_model.Repository{OwnerID: user.ID, Name: cargo_service.IndexRepositoryName}) diff --git a/tests/integration/api_private_serv_test.go b/tests/integration/api_private_serv_test.go index 6a62169b40..742d2d80d7 100644 --- a/tests/integration/api_private_serv_test.go +++ b/tests/integration/api_private_serv_test.go @@ -24,7 +24,7 @@ import ( ) func TestAPIPrivateNoServ(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { ctx, cancel := context.WithCancel(t.Context()) defer cancel() key, user, err := private.ServNoCommand(ctx, 1) @@ -46,7 +46,7 @@ func TestAPIPrivateNoServ(t *testing.T) { } func TestAPIPrivateServ(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { ctx, cancel := context.WithCancel(t.Context()) defer cancel() @@ -161,7 +161,7 @@ func TestAPIPrivateServ(t *testing.T) { } func TestAPIPrivateServAndNoServWithRequiredTwoFactor(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { ctx, cancel := context.WithCancel(t.Context()) defer cancel() diff --git a/tests/integration/api_pull_test.go b/tests/integration/api_pull_test.go index 301d351238..abd4427c52 100644 --- a/tests/integration/api_pull_test.go +++ b/tests/integration/api_pull_test.go @@ -314,7 +314,7 @@ func doAPIGetPullFiles(ctx APITestContext, pr *api.PullRequest, callback func(*t } func TestAPIPullDeleteBranchPerms(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { user2Session := loginUser(t, "user2") user4Session := loginUser(t, "user4") testRepoFork(t, user4Session, "user2", "repo1", "user4", "repo1") diff --git a/tests/integration/api_push_mirror_test.go b/tests/integration/api_push_mirror_test.go index 48976fd5eb..14af184048 100644 --- a/tests/integration/api_push_mirror_test.go +++ b/tests/integration/api_push_mirror_test.go @@ -40,7 +40,7 @@ import ( ) func TestAPIPushMirror(t *testing.T) { - onGiteaRun(t, testAPIPushMirror) + onApplicationRun(t, testAPIPushMirror) } func testAPIPushMirror(t *testing.T, u *url.URL) { @@ -144,7 +144,7 @@ func testAPIPushMirror(t *testing.T, u *url.URL) { } func TestAPIPushMirrorBranchFilter(t *testing.T) { - onGiteaRun(t, testAPIPushMirrorBranchFilter) + onApplicationRun(t, testAPIPushMirrorBranchFilter) } func testAPIPushMirrorBranchFilter(t *testing.T, u *url.URL) { @@ -302,7 +302,7 @@ func TestAPIPushMirrorSSH(t *testing.T) { t.Skip("SSH executable not present") } - onGiteaRun(t, func(t *testing.T, _ *url.URL) { + onApplicationRun(t, func(t *testing.T, _ *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() defer test.MockVariableValue(&setting.SSH.RootPath, t.TempDir())() diff --git a/tests/integration/api_quota_use_test.go b/tests/integration/api_quota_use_test.go index 1e3d41428a..1d1cf6062c 100644 --- a/tests/integration/api_quota_use_test.go +++ b/tests/integration/api_quota_use_test.go @@ -288,7 +288,7 @@ func prepareQuotaEnv(t *testing.T, username string) *quotaEnv { } func TestAPIQuotaUserCleanSlate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Quota.Enabled, true)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() @@ -308,13 +308,13 @@ func TestAPIQuotaUserCleanSlate(t *testing.T) { } func TestAPIQuotaEnforcement(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { testAPIQuotaEnforcement(t) }) } func TestAPIQuotaCountsTowardsCorrectUser(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := prepareQuotaEnv(t, "quota-correct-user-test") defer env.Cleanup() env.SetupWithSingleQuotaRule(t) @@ -350,7 +350,7 @@ func TestAPIQuotaCountsTowardsCorrectUser(t *testing.T) { } func TestAPIQuotaError(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := prepareQuotaEnv(t, "quota-enforcement") defer env.Cleanup() env.SetupWithSingleQuotaRule(t) @@ -1288,7 +1288,7 @@ func testAPIQuotaEnforcement(t *testing.T) { } func TestAPIQuotaOrgQuotaQuery(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := prepareQuotaEnv(t, "quota-enforcement") defer env.Cleanup() @@ -1315,7 +1315,7 @@ func TestAPIQuotaOrgQuotaQuery(t *testing.T) { } func TestAPIQuotaUserBasics(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := prepareQuotaEnv(t, "quota-enforcement") defer env.Cleanup() diff --git a/tests/integration/api_repo_actions_test.go b/tests/integration/api_repo_actions_test.go index 348ff45ed9..056adce698 100644 --- a/tests/integration/api_repo_actions_test.go +++ b/tests/integration/api_repo_actions_test.go @@ -48,7 +48,7 @@ func TestActionsAPISearchActionJobs_RepoRunner(t *testing.T) { } func TestActionsAPIWorkflowDispatchReturnInfo(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { workflowName := "dispatch.yml" user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user2.LowerName, auth_model.AccessTokenScopeWriteRepository) diff --git a/tests/integration/api_repo_branch_test.go b/tests/integration/api_repo_branch_test.go index 6ffe40ff44..a80ced6f12 100644 --- a/tests/integration/api_repo_branch_test.go +++ b/tests/integration/api_repo_branch_test.go @@ -25,7 +25,7 @@ import ( ) func TestAPIRepoBranchesPlain(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 3}) user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) session := loginUser(t, user1.LowerName) diff --git a/tests/integration/api_repo_collaborator_test.go b/tests/integration/api_repo_collaborator_test.go index 61f4f578d7..e7a19375a4 100644 --- a/tests/integration/api_repo_collaborator_test.go +++ b/tests/integration/api_repo_collaborator_test.go @@ -19,7 +19,7 @@ import ( ) func TestAPIRepoCollaboratorPermission(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repo2 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2}) repo2Owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo2.OwnerID}) diff --git a/tests/integration/api_repo_compare_test.go b/tests/integration/api_repo_compare_test.go index 1724924fdc..42f997eb7d 100644 --- a/tests/integration/api_repo_compare_test.go +++ b/tests/integration/api_repo_compare_test.go @@ -27,7 +27,7 @@ func TestAPICompareCommits(t *testing.T) { } func testAPICompareCommits(t *testing.T, objectFormat git.ObjectFormat) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { newBranchAndFile := func(ctx APITestContext, user *user_model.User, branch, filename string) func(*testing.T) { return func(t *testing.T) { doAPICreateFile(ctx, filename, &api.CreateFileOptions{ diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go index 4916ef97ef..536246d42e 100644 --- a/tests/integration/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -116,7 +116,7 @@ func getExpectedFileResponseForCreate(repoFullName, commitID, treePath, latestCo } func BenchmarkAPICreateFileSmall(b *testing.B) { - onGiteaRun(b, func(b *testing.B, u *url.URL) { + onApplicationRun(b, func(b *testing.B, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(b, &user_model.User{ID: 2}) // owner of the repo1 & repo16 repo1 := unittest.AssertExistsAndLoadBean(b, &repo_model.Repository{ID: 1}) // public repo @@ -131,7 +131,7 @@ func BenchmarkAPICreateFileSmall(b *testing.B) { func BenchmarkAPICreateFileMedium(b *testing.B) { data := make([]byte, 10*1024*1024) - onGiteaRun(b, func(b *testing.B, u *url.URL) { + onApplicationRun(b, func(b *testing.B, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(b, &user_model.User{ID: 2}) // owner of the repo1 & repo16 repo1 := unittest.AssertExistsAndLoadBean(b, &repo_model.Repository{ID: 1}) // public repo @@ -145,7 +145,7 @@ func BenchmarkAPICreateFileMedium(b *testing.B) { } func TestAPICreateFile(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the repo1 & repo16 org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the repo3, is an org user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // owner of neither repos diff --git a/tests/integration/api_repo_file_delete_test.go b/tests/integration/api_repo_file_delete_test.go index 428ef37e34..e50f170e74 100644 --- a/tests/integration/api_repo_file_delete_test.go +++ b/tests/integration/api_repo_file_delete_test.go @@ -38,7 +38,7 @@ func getDeleteFileOptions() *api.DeleteFileOptions { } func TestAPIDeleteFile(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the repo1 & repo16 org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the repo3, is an org user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // owner of neither repos diff --git a/tests/integration/api_repo_file_get_test.go b/tests/integration/api_repo_file_get_test.go index ab82e5cf15..ba3862569b 100644 --- a/tests/integration/api_repo_file_get_test.go +++ b/tests/integration/api_repo_file_get_test.go @@ -17,7 +17,7 @@ import ( ) func TestAPIGetRawFileOrLFS(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { t.Run("Normal raw file", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/api_repo_file_update_test.go b/tests/integration/api_repo_file_update_test.go index 878d865aff..1890544035 100644 --- a/tests/integration/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -107,7 +107,7 @@ func getExpectedFileResponseForUpdate(commitID, treePath, lastCommitSHA string) } func TestAPIUpdateFile(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the repo1 & repo16 org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the repo3, is an org user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // owner of neither repos diff --git a/tests/integration/api_repo_files_change_test.go b/tests/integration/api_repo_files_change_test.go index 6b1edd047b..341464f1de 100644 --- a/tests/integration/api_repo_files_change_test.go +++ b/tests/integration/api_repo_files_change_test.go @@ -60,7 +60,7 @@ func getChangeFilesOptions() *api.ChangeFilesOptions { } func TestAPIChangeFiles(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the repo1 & repo16 org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the repo3, is an org user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // owner of neither repos diff --git a/tests/integration/api_repo_get_contents_list_test.go b/tests/integration/api_repo_get_contents_list_test.go index 7d010ffdf1..f86885913c 100644 --- a/tests/integration/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -54,7 +54,7 @@ func getExpectedContentsListResponseForContents(ref, refType, lastCommitSHA stri } func TestAPIGetContentsList(t *testing.T) { - onGiteaRun(t, testAPIGetContentsList) + onApplicationRun(t, testAPIGetContentsList) } func testAPIGetContentsList(t *testing.T, u *url.URL) { diff --git a/tests/integration/api_repo_get_contents_test.go b/tests/integration/api_repo_get_contents_test.go index 47ac4cfc03..52c83cdab6 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -56,7 +56,7 @@ func getExpectedContentsResponseForContents(ref, refType, lastCommitSHA string) } func TestAPIGetContents(t *testing.T) { - onGiteaRun(t, testAPIGetContents) + onApplicationRun(t, testAPIGetContents) } func testAPIGetContents(t *testing.T, u *url.URL) { @@ -171,7 +171,7 @@ func testAPIGetContents(t *testing.T, u *url.URL) { } func TestAPIGetContentsRefFormats(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { file := "README.md" sha := "65f1bf27bc3bf70f64657658635e66094edbcb4d" content := "# repo1\n\nDescription for repo1" diff --git a/tests/integration/api_repo_git_notes_test.go b/tests/integration/api_repo_git_notes_test.go index dfafec7135..2e55ac25b1 100644 --- a/tests/integration/api_repo_git_notes_test.go +++ b/tests/integration/api_repo_git_notes_test.go @@ -19,7 +19,7 @@ import ( ) func TestAPIReposGetGitNotes(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) @@ -48,7 +48,7 @@ func TestAPIReposGetGitNotes(t *testing.T) { } func TestAPIReposSetGitNotes(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -76,7 +76,7 @@ func TestAPIReposSetGitNotes(t *testing.T) { } func TestAPIReposDeleteGitNotes(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/tests/integration/api_repo_languages_test.go b/tests/integration/api_repo_languages_test.go index d9a7f38db1..ef80037573 100644 --- a/tests/integration/api_repo_languages_test.go +++ b/tests/integration/api_repo_languages_test.go @@ -12,7 +12,7 @@ import ( ) func TestRepoLanguages(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") // Request editor page diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index e81f4307ee..1c17d5e04f 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -402,7 +402,7 @@ func TestAPIRepoMigrate(t *testing.T) { } func TestAPIRepoMigrateConflict(t *testing.T) { - onGiteaRun(t, testAPIRepoMigrateConflict) + onApplicationRun(t, testAPIRepoMigrateConflict) } func testAPIRepoMigrateConflict(t *testing.T, u *url.URL) { @@ -485,7 +485,7 @@ func TestAPIOrgRepoCreate(t *testing.T) { } func TestAPIRepoCreateConflict(t *testing.T) { - onGiteaRun(t, testAPIRepoCreateConflict) + onApplicationRun(t, testAPIRepoCreateConflict) } func testAPIRepoCreateConflict(t *testing.T, u *url.URL) { diff --git a/tests/integration/api_wiki_test.go b/tests/integration/api_wiki_test.go index 1720587dd4..d1a4102060 100644 --- a/tests/integration/api_wiki_test.go +++ b/tests/integration/api_wiki_test.go @@ -432,7 +432,7 @@ func TestAPIListPageRevisions(t *testing.T) { } func TestAPIWikiNonMasterBranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, _ *url.URL) { + onApplicationRun(t, func(t *testing.T, _ *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) repo, _, f := tests.CreateDeclarativeRepoWithOptions(t, user, tests.DeclarativeRepoOptions{ WikiBranch: optional.Some("main"), diff --git a/tests/integration/archived_labels_display_test.go b/tests/integration/archived_labels_display_test.go index c9748f81d6..4c9c605a10 100644 --- a/tests/integration/archived_labels_display_test.go +++ b/tests/integration/archived_labels_display_test.go @@ -14,7 +14,7 @@ import ( ) func TestArchivedLabelVisualProperties(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") // Create labels diff --git a/tests/integration/benchmarks_test.go b/tests/integration/benchmarks_test.go index 40875e0c7d..1aa3b821c2 100644 --- a/tests/integration/benchmarks_test.go +++ b/tests/integration/benchmarks_test.go @@ -24,7 +24,7 @@ func StringWithCharset(length int, charset string) string { } func BenchmarkRepoBranchCommit(b *testing.B) { - onGiteaRun(b, func(b *testing.B, u *url.URL) { + onApplicationRun(b, func(b *testing.B, u *url.URL) { samples := []int64{1, 2, 3} b.ResetTimer() diff --git a/tests/integration/branches_test.go b/tests/integration/branches_test.go index ed5d78bd78..3b3f423391 100644 --- a/tests/integration/branches_test.go +++ b/tests/integration/branches_test.go @@ -18,7 +18,7 @@ import ( ) func TestBranchActions(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) branch3 := unittest.AssertExistsAndLoadBean(t, &git_model.Branch{ID: 3, RepoID: repo1.ID}) diff --git a/tests/integration/cmd_admin_test.go b/tests/integration/cmd_admin_test.go index 4da1209c50..338df76ff9 100644 --- a/tests/integration/cmd_admin_test.go +++ b/tests/integration/cmd_admin_test.go @@ -20,7 +20,7 @@ import ( ) func Test_Cmd_AdminUser(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { for i, testCase := range []struct { name string options []string @@ -76,7 +76,7 @@ func Test_Cmd_AdminUser(t *testing.T) { } func Test_Cmd_AdminFirstUser(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { for _, testCase := range []struct { name string options []string @@ -154,7 +154,7 @@ func Test_Cmd_AdminFirstUser(t *testing.T) { } func Test_Cmd_AdminUserResetMFA(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { name := "testuser" options := []string{"user", "create", "--username", name, "--password", "password", "--email", name + "@example.com"} diff --git a/tests/integration/cmd_forgejo_actions_test.go b/tests/integration/cmd_forgejo_actions_test.go index 9d7db42c2e..653ff65a9d 100644 --- a/tests/integration/cmd_forgejo_actions_test.go +++ b/tests/integration/cmd_forgejo_actions_test.go @@ -21,7 +21,7 @@ import ( ) func TestActions_CmdForgejo_Actions(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { token, err := runMainApp("forgejo-cli", "actions", "generate-runner-token") require.NoError(t, err) assert.Len(t, token, 40) diff --git a/tests/integration/cmd_keys_test.go b/tests/integration/cmd_keys_test.go index 55d97a3a1d..edc44056b3 100644 --- a/tests/integration/cmd_keys_test.go +++ b/tests/integration/cmd_keys_test.go @@ -17,7 +17,7 @@ import ( ) func Test_CmdKeys(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { tests := []struct { name string args []string diff --git a/tests/integration/codeowner_test.go b/tests/integration/codeowner_test.go index 51468ffe09..632f07b647 100644 --- a/tests/integration/codeowner_test.go +++ b/tests/integration/codeowner_test.go @@ -204,7 +204,7 @@ type CodeownerTest struct { } func TestCodeOwner(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { tests := []CodeownerTest{ {Name: "root", Path: "CODEOWNERS"}, {Name: "docs", Path: "docs/CODEOWNERS"}, diff --git a/tests/integration/comment_roles_test.go b/tests/integration/comment_roles_test.go index 63b5d5f7cc..d5346e444e 100644 --- a/tests/integration/comment_roles_test.go +++ b/tests/integration/comment_roles_test.go @@ -29,7 +29,7 @@ func TestCommentRoles(t *testing.T) { newContributorTooltip := locale.TrString("repo.issues.role.first_time_contributor_helper") // Test pulls - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { sessionUser1 := loginUser(t, "user1") sessionUser2 := loginUser(t, "user2") sessionUser11 := loginUser(t, "user11") @@ -109,7 +109,7 @@ func TestCommentRoles(t *testing.T) { }) // Test issues - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { sessionUser1 := loginUser(t, "user1") sessionUser2 := loginUser(t, "user2") sessionUser5 := loginUser(t, "user5") diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go index 581aa67659..396c1c22ad 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -242,7 +242,7 @@ func TestCompareBranches(t *testing.T) { } func TestCompareWithPRsDisabled(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testCreateBranch(t, session, "user1", "repo1", "branch/master", "recent-push", http.StatusSeeOther) @@ -303,7 +303,7 @@ func TestCompareWithPRsDisabled(t *testing.T) { } func TestCompareCrossRepo(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1-copy") testCreateBranch(t, session, "user1", "repo1-copy", "branch/master", "recent-push", http.StatusSeeOther) @@ -332,7 +332,7 @@ func TestCompareCrossRepo(t *testing.T) { } func TestCompareCodeExpand(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) // Create a new repository, with a file that has many lines @@ -405,7 +405,7 @@ func TestCompareCodeExpand(t *testing.T) { } func TestCompareSignedIn(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { // Setup the test with a connected user session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") diff --git a/tests/integration/dump_restore_test.go b/tests/integration/dump_restore_test.go index daf95eb631..592af6ad87 100644 --- a/tests/integration/dump_restore_test.go +++ b/tests/integration/dump_restore_test.go @@ -28,7 +28,7 @@ import ( ) func TestDumpRestore(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { AllowLocalNetworks := setting.Migrations.AllowLocalNetworks setting.Migrations.AllowLocalNetworks = true AppVer := setting.AppVer diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index 3dbfbd899e..7909560e86 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -29,7 +29,7 @@ import ( ) func TestCreateFileOnProtectedBranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") csrf := GetCSRF(t, session, "/user2/repo1/settings/branches") @@ -150,14 +150,14 @@ func testEditFileToNewBranch(t *testing.T, session *TestSession, user, repo, bra } func TestEditFile(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") testEditFile(t, session, "user2", "repo1", "master", "README.md", "Hello, World (Edited)\n") }) } func TestEditFileToNewBranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") testEditFileToNewBranch(t, session, "user2", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited)\n") }) @@ -177,7 +177,7 @@ func TestEditorAddTranslation(t *testing.T) { } func TestCommitMail(t *testing.T) { - onGiteaRun(t, func(t *testing.T, _ *url.URL) { + onApplicationRun(t, func(t *testing.T, _ *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Require that the user has KeepEmailPrivate enabled, because it needs // to be tested that even with this setting enabled, it will use the diff --git a/tests/integration/forgejo_git_test.go b/tests/integration/forgejo_git_test.go index 693d6d9209..28ee572b8d 100644 --- a/tests/integration/forgejo_git_test.go +++ b/tests/integration/forgejo_git_test.go @@ -25,7 +25,7 @@ import ( ) func TestActionsUserGit(t *testing.T) { - onGiteaRun(t, testActionsUserGit) + onApplicationRun(t, testActionsUserGit) } func NewActionsUserTestContext(t *testing.T, username, reponame string) APITestContext { diff --git a/tests/integration/git_helper_for_declarative_test.go b/tests/integration/git_helper_for_declarative_test.go index 5be5c6088c..1d8f44c8dc 100644 --- a/tests/integration/git_helper_for_declarative_test.go +++ b/tests/integration/git_helper_for_declarative_test.go @@ -62,7 +62,7 @@ func createSSHUrl(gitPath string, u *url.URL) *url.URL { var rootPathRe = regexp.MustCompile("\\[repository\\]\nROOT\\s=\\s.*") -func onGiteaRun[T testing.TB](t T, callback func(T, *url.URL)) { +func onApplicationRun[T testing.TB](t T, callback func(T, *url.URL)) { defer tests.PrepareTestEnv(t, 1)() s := http.Server{ Handler: testWebRoutes, diff --git a/tests/integration/git_push_test.go b/tests/integration/git_push_test.go index 977385ff6a..61e2a65f97 100644 --- a/tests/integration/git_push_test.go +++ b/tests/integration/git_push_test.go @@ -38,7 +38,7 @@ func forEachObjectFormat(t *testing.T, f func(t *testing.T, objectFormat git.Obj } func TestGitPush(t *testing.T) { - onGiteaRun(t, testGitPush) + onApplicationRun(t, testGitPush) } func testGitPush(t *testing.T, u *url.URL) { @@ -205,7 +205,7 @@ func runTestGitPush(t *testing.T, u *url.URL, objectFormat git.ObjectFormat, git } func TestOptionsGitPush(t *testing.T) { - onGiteaRun(t, testOptionsGitPush) + onApplicationRun(t, testOptionsGitPush) } func testOptionsGitPush(t *testing.T, u *url.URL) { diff --git a/tests/integration/git_smart_http_test.go b/tests/integration/git_smart_http_test.go index 84de08751d..3608f9fd5b 100644 --- a/tests/integration/git_smart_http_test.go +++ b/tests/integration/git_smart_http_test.go @@ -24,7 +24,7 @@ import ( ) func TestGitSmartHTTP(t *testing.T) { - onGiteaRun(t, testGitSmartHTTP) + onApplicationRun(t, testGitSmartHTTP) } func testGitSmartHTTP(t *testing.T, u *url.URL) { diff --git a/tests/integration/git_test.go b/tests/integration/git_test.go index e865496bce..f596f7b05f 100644 --- a/tests/integration/git_test.go +++ b/tests/integration/git_test.go @@ -49,11 +49,11 @@ const ( ) func TestGit(t *testing.T) { - onGiteaRun(t, testGit) + onApplicationRun(t, testGit) } func TestActionsTokenAuth(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { task := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionTask{ID: 47}) task.GenerateToken() actions_model.UpdateTask(db.DefaultContext, task) @@ -1098,7 +1098,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string } func TestDataAsync_Issue29101(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) diff --git a/tests/integration/issue_subscribe_test.go b/tests/integration/issue_subscribe_test.go index 533526c388..bdd8c4eb27 100644 --- a/tests/integration/issue_subscribe_test.go +++ b/tests/integration/issue_subscribe_test.go @@ -13,7 +13,7 @@ import ( ) func TestIssueSubscribe(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := emptyTestSession(t) testIssueSubscribe(t, *session, true) }) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 6ad9a9b67f..8f0add1819 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -1320,7 +1320,7 @@ func TestIssueFilterNoFollow(t *testing.T) { } func TestIssueForm(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) repo, _, f := tests.CreateDeclarativeRepo(t, user2, "", @@ -1369,7 +1369,7 @@ body: } func TestIssueUnsubscription(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) repo, _, f := tests.CreateDeclarativeRepoWithOptions(t, user, tests.DeclarativeRepoOptions{ AutoInit: optional.Some(false), diff --git a/tests/integration/linguist_test.go b/tests/integration/linguist_test.go index 85080c1d2e..efeaaabb98 100644 --- a/tests/integration/linguist_test.go +++ b/tests/integration/linguist_test.go @@ -24,7 +24,7 @@ import ( ) func TestLinguistSupport(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { /****************** ** Preparations ** ******************/ diff --git a/tests/integration/migrate_test.go b/tests/integration/migrate_test.go index dc11101d97..75c4a4cfb3 100644 --- a/tests/integration/migrate_test.go +++ b/tests/integration/migrate_test.go @@ -59,7 +59,7 @@ func TestMigrateLocalPath(t *testing.T) { } func TestMigrate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.AppVer, "1.16.0")() require.NoError(t, migrations.Init()) @@ -115,7 +115,7 @@ func TestMigrate(t *testing.T) { } func TestMigrateWithWiki(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.AppVer, "1.16.0")() require.NoError(t, migrations.Init()) @@ -174,7 +174,7 @@ func TestMigrateWithWiki(t *testing.T) { } func TestMigrateWithReleases(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.AppVer, "1.16.0")() require.NoError(t, migrations.Init()) diff --git a/tests/integration/mirror_push_test.go b/tests/integration/mirror_push_test.go index b47a793a9e..f9d931a76e 100644 --- a/tests/integration/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -84,7 +84,7 @@ func TestPushMirrorRedactCredential(t *testing.T) { } func TestMirrorPush(t *testing.T) { - onGiteaRun(t, testMirrorPush) + onApplicationRun(t, testMirrorPush) } func testMirrorPush(t *testing.T, u *url.URL) { @@ -227,7 +227,7 @@ func TestSSHPushMirror(t *testing.T) { t.Skip("SSH executable not present") } - onGiteaRun(t, func(t *testing.T, _ *url.URL) { + onApplicationRun(t, func(t *testing.T, _ *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() defer test.MockVariableValue(&setting.SSH.RootPath, t.TempDir())() @@ -389,7 +389,7 @@ func TestSSHPushMirror(t *testing.T) { } func TestPushMirrorBranchFilterWebUI(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() require.NoError(t, migrations.Init()) @@ -490,7 +490,7 @@ func TestPushMirrorBranchFilterWebUI(t *testing.T) { } func TestPushMirrorBranchFilterIntegration(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() require.NoError(t, migrations.Init()) @@ -579,7 +579,7 @@ func TestPushMirrorBranchFilterIntegration(t *testing.T) { } func TestPushMirrorSettings(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() require.NoError(t, migrations.Init()) @@ -658,7 +658,7 @@ func TestPushMirrorSettings(t *testing.T) { } func TestPushMirrorBranchFilterSyncOperations(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() require.NoError(t, migrations.Init()) @@ -892,7 +892,7 @@ func TestPushMirrorBranchFilterSyncOperations(t *testing.T) { } func TestPushMirrorWebUIToAPIIntegration(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() defer test.MockVariableValue(&setting.Mirror.Enabled, true)() require.NoError(t, migrations.Init()) diff --git a/tests/integration/new_org_test.go b/tests/integration/new_org_test.go index 5ea386573a..9159d86b69 100644 --- a/tests/integration/new_org_test.go +++ b/tests/integration/new_org_test.go @@ -15,7 +15,7 @@ import ( ) func TestNewOrganizationForm(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") locale := translation.NewLocale("en-US") diff --git a/tests/integration/oauth_test.go b/tests/integration/oauth_test.go index ebfd386ee0..e27201ac28 100644 --- a/tests/integration/oauth_test.go +++ b/tests/integration/oauth_test.go @@ -582,7 +582,7 @@ func TestSignInOAuthCallbackWithoutPKCEWhenUnsupported(t *testing.T) { } func TestSignInOAuthCallbackPKCE(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { // Setup authentication source sourceName := "oidc" authSource := addAuthSource(t, authSourcePayloadOpenIDConnect(sourceName, u.String())) diff --git a/tests/integration/org_count_test.go b/tests/integration/org_count_test.go index 93035c8e5b..35af738509 100644 --- a/tests/integration/org_count_test.go +++ b/tests/integration/org_count_test.go @@ -20,7 +20,7 @@ import ( ) func TestOrgCounts(t *testing.T) { - onGiteaRun(t, testOrgCounts) + onApplicationRun(t, testOrgCounts) } func testOrgCounts(t *testing.T, u *url.URL) { diff --git a/tests/integration/org_profile_test.go b/tests/integration/org_profile_test.go index 2cd80cc1de..381d11c95f 100644 --- a/tests/integration/org_profile_test.go +++ b/tests/integration/org_profile_test.go @@ -20,7 +20,7 @@ import ( ) func TestOrgProfile(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { checkReadme := func(t *testing.T, title, readmeFilename string, expectedCount int) { t.Run(title, func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/patch_status_test.go b/tests/integration/patch_status_test.go index c54cad91c4..ef34f34903 100644 --- a/tests/integration/patch_status_test.go +++ b/tests/integration/patch_status_test.go @@ -32,7 +32,7 @@ import ( ) func TestPatchStatus(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) diff --git a/tests/integration/proctected_branch_test.go b/tests/integration/proctected_branch_test.go index 5024b63c42..e7680e4017 100644 --- a/tests/integration/proctected_branch_test.go +++ b/tests/integration/proctected_branch_test.go @@ -19,7 +19,7 @@ import ( ) func TestProtectedBranch_AdminEnforcement(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "add-readme", "README.md", "WIP") diff --git a/tests/integration/pull_commit_test.go b/tests/integration/pull_commit_test.go index 1f9a6ffd22..562cbcb334 100644 --- a/tests/integration/pull_commit_test.go +++ b/tests/integration/pull_commit_test.go @@ -77,7 +77,7 @@ func TestPullCommitSignature(t *testing.T) { fromBranch := "master" toBranch := "branch-signed" - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { // Use a new GNUPGPHOME to avoid messing with the existing GPG keyring. tmpDir := t.TempDir() require.NoError(t, os.Chmod(tmpDir, 0o700)) diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index 1cd8ca8347..101e5ed7fa 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -97,7 +97,7 @@ func testPullCreateDirectly(t *testing.T, session *TestSession, baseRepoOwner, b } func TestPullCreate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") @@ -125,7 +125,7 @@ func TestPullCreate(t *testing.T) { } func TestPullCreateWithPullTemplate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { baseUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) forkUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) @@ -226,7 +226,7 @@ func TestPullCreateWithPullTemplate(t *testing.T) { } func TestPullCreate_TitleEscape(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") @@ -288,7 +288,7 @@ func testDeleteRepository(t *testing.T, session *TestSession, ownerName, repoNam } func TestPullBranchDelete(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testCreateBranch(t, session, "user1", "repo1", "branch/master", "master1", http.StatusSeeOther) @@ -314,7 +314,7 @@ func TestPullBranchDelete(t *testing.T) { } func TestRecentlyPushed(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") @@ -576,7 +576,7 @@ Test checks: Check if pull request can be created from base to the fork repository. */ func TestPullCreatePrFromBaseToFork(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { sessionFork := loginUser(t, "user1") testRepoFork(t, sessionFork, "user2", "repo1", "user1", "repo1") @@ -593,7 +593,7 @@ func TestPullCreatePrFromBaseToFork(t *testing.T) { } func TestPullCreatePrFromForkToFork(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { sessionFork1 := loginUser(t, "user1") testRepoFork(t, sessionFork1, "user2", "repo1", "user1", "repo1") sessionFork3 := loginUser(t, "user30") diff --git a/tests/integration/pull_diff_test.go b/tests/integration/pull_diff_test.go index 0f28bbbd49..aca826d4ab 100644 --- a/tests/integration/pull_diff_test.go +++ b/tests/integration/pull_diff_test.go @@ -69,7 +69,7 @@ func doTestPRDiff(t *testing.T, prDiffURL string, expectedFilenames []string, ed } func TestPullDiff_AGitNotEditable(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) diff --git a/tests/integration/pull_icon_test.go b/tests/integration/pull_icon_test.go index 9ab8f244cf..fbd87a7234 100644 --- a/tests/integration/pull_icon_test.go +++ b/tests/integration/pull_icon_test.go @@ -30,7 +30,7 @@ import ( ) func TestPullRequestIcons(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) repo, _, f := tests.CreateDeclarativeRepo(t, user, "pr-icons", []unit_model.Type{unit_model.TypeCode, unit_model.TypePullRequests}, nil, nil) defer f() diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go index b8923dd6f4..e7ef680f3c 100644 --- a/tests/integration/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -133,7 +133,7 @@ func retrieveHookTasks(t *testing.T, hookID int64, activateWebhook bool) []*webh } func TestPullMerge(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { hookTasks := retrieveHookTasks(t, 1, true) hookTasksLenBefore := len(hookTasks) @@ -153,7 +153,7 @@ func TestPullMerge(t *testing.T) { } func TestPullRebase(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { hookTasks := retrieveHookTasks(t, 1, true) hookTasksLenBefore := len(hookTasks) @@ -173,7 +173,7 @@ func TestPullRebase(t *testing.T) { } func TestPullRebaseMerge(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { hookTasks := retrieveHookTasks(t, 1, true) hookTasksLenBefore := len(hookTasks) @@ -193,7 +193,7 @@ func TestPullRebaseMerge(t *testing.T) { } func TestPullSquash(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { hookTasks := retrieveHookTasks(t, 1, true) hookTasksLenBefore := len(hookTasks) @@ -214,7 +214,7 @@ func TestPullSquash(t *testing.T) { } func TestPullCleanUpAfterMerge(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - TestPullCleanUpAfterMerge)\n") @@ -249,7 +249,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) { } func TestCantMergeWorkInProgress(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFile(t, session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n") @@ -268,7 +268,7 @@ func TestCantMergeWorkInProgress(t *testing.T) { } func TestCantMergeConflict(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "conflict", "README.md", "Hello, World (Edited Once)\n") @@ -338,7 +338,7 @@ func TestCantMergeConflict(t *testing.T) { } func TestCantMergeUnrelated(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base", "README.md", "Hello, World (Edited Twice)\n") @@ -433,7 +433,7 @@ func TestCantMergeUnrelated(t *testing.T) { } func TestFastForwardOnlyMerge(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "update", "README.md", "Hello, World 2\n") @@ -474,7 +474,7 @@ func TestFastForwardOnlyMerge(t *testing.T) { } func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "diverging", "README.md", "Hello, World diverged\n") @@ -517,7 +517,7 @@ func TestCantFastForwardOnlyMergeDiverging(t *testing.T) { } func TestPullRetargetChildOnBranchDelete(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testEditFileToNewBranch(t, session, "user2", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullRetargetOnCleanup - base PR)\n") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") @@ -547,7 +547,7 @@ func TestPullRetargetChildOnBranchDelete(t *testing.T) { } func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "base-pr", "README.md", "Hello, World\n(Edited - TestPullDontRetargetChildOnWrongRepo - base PR)\n") @@ -577,7 +577,7 @@ func TestPullDontRetargetChildOnWrongRepo(t *testing.T) { } func TestPullMergeIndexerNotifier(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { // create a pull request session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") @@ -650,7 +650,7 @@ func testResetRepo(t *testing.T, repoPath, branch, commitID string) { } func TestPullMergeBranchProtect(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { admin := "user1" owner := "user5" notOwner := "user4" @@ -925,7 +925,7 @@ func testPullAutoMergeAfterCommitStatusSucceed(t *testing.T, ctx APITestContext, } func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { for _, testCase := range []struct { name string forkName string @@ -981,7 +981,7 @@ func TestPullAutoMergeAfterCommitStatusSucceed(t *testing.T) { } func TestPullAutoMergeAfterCommitStatusSucceedAndApprovalForAgitFlow(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { // create a pull request baseAPITestContext := NewAPITestContext(t, "user2", "repo1", auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeWriteUser) @@ -1106,7 +1106,7 @@ func TestPullAutoMergeAfterCommitStatusSucceedAndApprovalForAgitFlow(t *testing. } func TestPullDeleteBranchPerms(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { user2Session := loginUser(t, "user2") user4Session := loginUser(t, "user4") testRepoFork(t, user4Session, "user2", "repo1", "user4", "repo1") @@ -1138,7 +1138,7 @@ func TestPullDeleteBranchPerms(t *testing.T) { // Test that rebasing only happens when its necessary. func TestRebaseWhenNecessary(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") diff --git a/tests/integration/pull_reopen_test.go b/tests/integration/pull_reopen_test.go index abb647c114..937bc4c2ac 100644 --- a/tests/integration/pull_reopen_test.go +++ b/tests/integration/pull_reopen_test.go @@ -32,7 +32,7 @@ import ( ) func TestPullrequestReopen(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) org26 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 26}) diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go index 131e8537c7..ea1c9a1be2 100644 --- a/tests/integration/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -72,7 +72,7 @@ func loadComment(t *testing.T, commentID string) *issues_model.Comment { } func TestPullView_SelfReviewNotification(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { user1Session := loginUser(t, "user1") user2Session := loginUser(t, "user2") @@ -349,7 +349,7 @@ func TestPullView_ResolveInvalidatedReviewComment(t *testing.T) { } func TestPullView_CodeOwner(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo, _, f := tests.CreateDeclarativeRepo(t, user2, "test_codeowner", nil, nil, []*files_service.ChangeRepoFile{ @@ -448,7 +448,7 @@ func TestPullView_CodeOwner(t *testing.T) { } func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { user1Session := loginUser(t, "user1") user2Session := loginUser(t, "user2") @@ -582,7 +582,7 @@ func TestPullReview_OldLatestCommitId(t *testing.T) { } func TestPullReviewInArchivedRepo(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user2") // Open a PR @@ -821,7 +821,7 @@ func updateFileInBranch(user *user_model.User, repo *repo_model.Repository, tree } func TestPullRequestStaleReview(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) diff --git a/tests/integration/pull_status_test.go b/tests/integration/pull_status_test.go index 9786c559ea..f0b90ff4d6 100644 --- a/tests/integration/pull_status_test.go +++ b/tests/integration/pull_status_test.go @@ -21,7 +21,7 @@ import ( ) func TestPullCreate_CommitStatus(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "status1", "README.md", "status1") @@ -120,7 +120,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { // Reason: gitflow and merging master back into develop, where is high possibility, there are no changes // but just commit saying "Merge branch". And this meta commit can be also tagged, // so we need to have this meta commit also in develop branch. - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testEditFileToNewBranch(t, session, "user1", "repo1", "master", "status1", "README.md", "status1") @@ -145,7 +145,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) { } func TestPullCreate_EmptyChangesWithSameCommits(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") testCreateBranch(t, session, "user1", "repo1", "branch/master", "status1", http.StatusSeeOther) diff --git a/tests/integration/pull_summary_test.go b/tests/integration/pull_summary_test.go index 75c12720bf..d5e751bf80 100644 --- a/tests/integration/pull_summary_test.go +++ b/tests/integration/pull_summary_test.go @@ -14,7 +14,7 @@ import ( ) func TestPullSummaryCommits(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { testUser := "user2" testRepo := "repo1" branchOld := "master" diff --git a/tests/integration/pull_update_test.go b/tests/integration/pull_update_test.go index 692699d24f..ad117355e5 100644 --- a/tests/integration/pull_update_test.go +++ b/tests/integration/pull_update_test.go @@ -30,7 +30,7 @@ import ( ) func TestAPIPullUpdate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { // Create PR to test user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) org26 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 26}) @@ -59,7 +59,7 @@ func TestAPIPullUpdate(t *testing.T) { } func TestAPIPullUpdateByRebase(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { // Create PR to test user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) org26 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 26}) @@ -88,7 +88,7 @@ func TestAPIPullUpdateByRebase(t *testing.T) { } func TestAPIViewUpdateSettings(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { // Create PR to test user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) org26 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 26}) @@ -122,13 +122,13 @@ func TestAPIViewUpdateSettings(t *testing.T) { } func TestViewPullUpdateByMerge(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { testViewPullUpdate(t, "merge") }) } func TestViewPullUpdateByRebase(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { testViewPullUpdate(t, "rebase") }) } @@ -273,7 +273,7 @@ func createOutdatedPR(t *testing.T, actor, forkOrg *user_model.User) *issues_mod } func TestStatusDuringUpdate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") // Adjust this pull request to be in the conflict checker and having a head diff --git a/tests/integration/pull_wip_convert_test.go b/tests/integration/pull_wip_convert_test.go index 935636bd7f..ef63d8751c 100644 --- a/tests/integration/pull_wip_convert_test.go +++ b/tests/integration/pull_wip_convert_test.go @@ -14,7 +14,7 @@ import ( ) func TestPullWIPConvertSidebar(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { testRepo := "repo1" branchOld := "master" branchNew := "wip" diff --git a/tests/integration/quota_use_test.go b/tests/integration/quota_use_test.go index 105c2305d0..29a4972651 100644 --- a/tests/integration/quota_use_test.go +++ b/tests/integration/quota_use_test.go @@ -35,7 +35,7 @@ import ( ) func TestWebQuotaEnforcementRepoMigrate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -48,7 +48,7 @@ func TestWebQuotaEnforcementRepoMigrate(t *testing.T) { } func TestWebQuotaEnforcementRepoCreate(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -57,7 +57,7 @@ func TestWebQuotaEnforcementRepoCreate(t *testing.T) { } func TestWebQuotaEnforcementRepoFork(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -69,7 +69,7 @@ func TestWebQuotaEnforcementRepoFork(t *testing.T) { } func TestWebQuotaEnforcementIssueAttachment(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -94,7 +94,7 @@ func TestWebQuotaEnforcementIssueAttachment(t *testing.T) { } func TestWebQuotaEnforcementMirrorSync(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -115,7 +115,7 @@ func TestWebQuotaEnforcementMirrorSync(t *testing.T) { } func TestWebQuotaEnforcementRepoContentEditing(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -164,7 +164,7 @@ func TestWebQuotaEnforcementRepoContentEditing(t *testing.T) { } func TestWebQuotaEnforcementRepoBranches(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -227,7 +227,7 @@ func TestWebQuotaEnforcementRepoBranches(t *testing.T) { } func TestWebQuotaEnforcementRepoReleases(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -262,7 +262,7 @@ func TestWebQuotaEnforcementRepoReleases(t *testing.T) { } func TestWebQuotaEnforcementRepoPulls(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -300,7 +300,7 @@ func TestWebQuotaEnforcementRepoPulls(t *testing.T) { } func TestWebQuotaEnforcementRepoTransfer(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -366,7 +366,7 @@ func TestWebQuotaEnforcementRepoTransfer(t *testing.T) { } func TestGitQuotaEnforcement(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() @@ -549,7 +549,7 @@ func TestGitQuotaEnforcement(t *testing.T) { } func TestQuotaConfigDefault(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { env := createQuotaWebEnv(t) defer env.Cleanup() diff --git a/tests/integration/rename_branch_test.go b/tests/integration/rename_branch_test.go index 6dfebc3976..6b186e38f2 100644 --- a/tests/integration/rename_branch_test.go +++ b/tests/integration/rename_branch_test.go @@ -18,7 +18,7 @@ import ( ) func TestRenameBranch(t *testing.T) { - onGiteaRun(t, testRenameBranch) + onApplicationRun(t, testRenameBranch) } func testRenameBranch(t *testing.T, u *url.URL) { diff --git a/tests/integration/repo_activity_test.go b/tests/integration/repo_activity_test.go index 7fb019c388..e30f92daa3 100644 --- a/tests/integration/repo_activity_test.go +++ b/tests/integration/repo_activity_test.go @@ -28,7 +28,7 @@ import ( ) func TestRepoActivity(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { session := loginUser(t, "user1") // Create PRs (1 merged & 2 proposed) diff --git a/tests/integration/repo_archive_test.go b/tests/integration/repo_archive_test.go index f0ffedfd9b..e5f5c5be0f 100644 --- a/tests/integration/repo_archive_test.go +++ b/tests/integration/repo_archive_test.go @@ -46,7 +46,7 @@ func TestRepoDownloadArchive(t *testing.T) { } func TestRepoDownloadArchiveSubdir(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { defer test.MockVariableValue(&setting.EnableGzip, true)() defer test.MockVariableValue(&web.GzipMinSize, 10)() defer test.MockVariableValue(&testWebRoutes, routers.NormalRoutes())() diff --git a/tests/integration/repo_archive_text_test.go b/tests/integration/repo_archive_text_test.go index db133ce7d7..e8343f3fef 100644 --- a/tests/integration/repo_archive_text_test.go +++ b/tests/integration/repo_archive_text_test.go @@ -20,7 +20,7 @@ import ( ) func TestArchiveText(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { testUser := "user2" user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: testUser}) session := loginUser(t, testUser) diff --git a/tests/integration/repo_badges_test.go b/tests/integration/repo_badges_test.go index 928a9975fe..e4a62d8cfc 100644 --- a/tests/integration/repo_badges_test.go +++ b/tests/integration/repo_badges_test.go @@ -31,7 +31,7 @@ import ( ) func TestBadges(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { prep := func(t *testing.T) (*repo_model.Repository, func()) { owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) diff --git a/tests/integration/repo_branch_test.go b/tests/integration/repo_branch_test.go index 3cb6e42c89..1b12180eca 100644 --- a/tests/integration/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -46,7 +46,7 @@ func testCreateBranch(t testing.TB, session *TestSession, user, repo, oldRefSubU } func TestCreateBranch(t *testing.T) { - onGiteaRun(t, testCreateBranches) + onApplicationRun(t, testCreateBranches) } func testCreateBranches(t *testing.T, giteaURL *url.URL) { @@ -161,7 +161,7 @@ func TestCreateBranchInvalidCSRF(t *testing.T) { } func TestDatabaseMissingABranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, URL *url.URL) { + onApplicationRun(t, func(t *testing.T, URL *url.URL) { session := loginUser(t, "user2") // Create two branches @@ -206,7 +206,7 @@ func TestDatabaseMissingABranch(t *testing.T) { } func TestCreateBranchButtonVisibility(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user1") t.Run("Check create branch button", func(t *testing.T) { diff --git a/tests/integration/repo_citation_test.go b/tests/integration/repo_citation_test.go index 5651ac3db3..7a3251d987 100644 --- a/tests/integration/repo_citation_test.go +++ b/tests/integration/repo_citation_test.go @@ -20,7 +20,7 @@ import ( ) func TestCitation(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) session := loginUser(t, user.LoginName) diff --git a/tests/integration/repo_fork_test.go b/tests/integration/repo_fork_test.go index c986164b50..cb8f398257 100644 --- a/tests/integration/repo_fork_test.go +++ b/tests/integration/repo_fork_test.go @@ -75,7 +75,7 @@ func testRepoForkLegacyRedirect(t *testing.T, session *TestSession, ownerName, r } func TestRepoFork(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user5 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user5"}) session := loginUser(t, user5.Name) @@ -210,7 +210,7 @@ func TestRepoFork(t *testing.T) { } func TestRepoForkToOrg(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user2") org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "org3"}) @@ -243,7 +243,7 @@ func TestRepoForkToOrg(t *testing.T) { func TestForkListPrivateRepo(t *testing.T) { forkItemSelector := ".tw-flex.tw-items-center.tw-py-2" - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { session := loginUser(t, "user5") org23 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 23, Visibility: structs.VisibleTypePrivate}) diff --git a/tests/integration/repo_generate_test.go b/tests/integration/repo_generate_test.go index 44987c14b0..6a61e36668 100644 --- a/tests/integration/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -224,7 +224,7 @@ func TestRepoCreateFormTrimSpace(t *testing.T) { } func TestRepoGenerateTemplating(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { input := `# $REPO_NAME This is a Repo By $REPO_OWNER ThisIsThe${REPO_NAME}InAnInlineWay` diff --git a/tests/integration/repo_git_note_test.go b/tests/integration/repo_git_note_test.go index e6b23754db..34c22ae3c0 100644 --- a/tests/integration/repo_git_note_test.go +++ b/tests/integration/repo_git_note_test.go @@ -11,7 +11,7 @@ import ( ) func TestRepoModifyGitNotes(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { session := loginUser(t, "user2") req := NewRequest(t, "GET", "/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d") @@ -46,7 +46,7 @@ func TestRepoModifyGitNotes(t *testing.T) { } func TestRepoGitNotesButtonsVisible(t *testing.T) { - onGiteaRun(t, func(*testing.T, *url.URL) { + onApplicationRun(t, func(*testing.T, *url.URL) { t.Run("With Permission", func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/repo_issue_title_test.go b/tests/integration/repo_issue_title_test.go index 587db43223..a722ef5610 100644 --- a/tests/integration/repo_issue_title_test.go +++ b/tests/integration/repo_issue_title_test.go @@ -26,7 +26,7 @@ import ( ) func TestIssueTitles(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) repo, _, f := tests.CreateDeclarativeRepo(t, user, "issue-titles", nil, nil, nil) defer f() diff --git a/tests/integration/repo_migrate_credentials_test.go b/tests/integration/repo_migrate_credentials_test.go index b63ca9b29e..ed0d798ec7 100644 --- a/tests/integration/repo_migrate_credentials_test.go +++ b/tests/integration/repo_migrate_credentials_test.go @@ -21,7 +21,7 @@ import ( ) func TestRepoMigrateWithCredentials(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Migrations.AllowLocalNetworks, true)() require.NoError(t, migrations.Init()) diff --git a/tests/integration/repo_sync_fork_test.go b/tests/integration/repo_sync_fork_test.go index fb08a69d8b..46730641ce 100644 --- a/tests/integration/repo_sync_fork_test.go +++ b/tests/integration/repo_sync_fork_test.go @@ -77,25 +77,25 @@ func syncForkTest(t *testing.T, forkName, branchName string, webSync bool) { } func TestAPIRepoSyncForkDefault(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { syncForkTest(t, "SyncForkDefault", "master", false) }) } func TestAPIRepoSyncForkBranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { syncForkTest(t, "SyncForkBranch", "master", false) }) } func TestWebRepoSyncForkBranch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { syncForkTest(t, "SyncForkBranch", "master", true) }) } func TestWebRepoSyncForkHomepage(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { baseRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) baseOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: baseRepo.OwnerID}) baseOwnerSession := loginUser(t, baseOwner.Name) diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index b119f5d917..972a51089b 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -86,7 +86,7 @@ func TestTagViewWithoutRelease(t *testing.T) { } func TestCreateNewTagProtected(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -155,7 +155,7 @@ func TestCreateNewTagProtected(t *testing.T) { } func TestSyncRepoTags(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -193,7 +193,7 @@ func TestSyncRepoTags(t *testing.T) { } func TestRepushTag(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) session := loginUser(t, owner.LowerName) diff --git a/tests/integration/repo_test.go b/tests/integration/repo_test.go index f8b926e8be..bd5900070d 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -722,7 +722,7 @@ func TestViewCommitSignature(t *testing.T) { fromBranch := "master" toBranch := "branch-signed" - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { // Use a new GNUPGPHOME to avoid messing with the existing GPG keyring. tmpDir := t.TempDir() require.NoError(t, os.Chmod(tmpDir, 0o700)) @@ -931,7 +931,7 @@ func TestRepoHomeViewRedirect(t *testing.T) { } func TestRepoFilesList(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // create the repo @@ -1492,7 +1492,7 @@ func TestRepoIssueFilterLinks(t *testing.T) { } func TestRepoSubmoduleView(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo, _, f := tests.CreateDeclarativeRepo(t, user2, "", []unit_model.Type{unit_model.TypeCode}, nil, nil) defer f() diff --git a/tests/integration/repo_view_test.go b/tests/integration/repo_view_test.go index 7ea4aeb4c6..ce24aca16a 100644 --- a/tests/integration/repo_view_test.go +++ b/tests/integration/repo_view_test.go @@ -62,7 +62,7 @@ func createRepoAndGetContext(t *testing.T, files []string, deleteMdReadme bool) } func TestRepoView_FindReadme(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { t.Run("PrioOneLocalizedMdReadme", func(t *testing.T) { defer tests.PrintCurrentTest(t)() ctx, f := createRepoAndGetContext(t, []string{"README.en.md", "README.en.org", "README.org", "README.txt", "README.tex"}, false) @@ -155,7 +155,7 @@ func TestRepoView_FindReadme(t *testing.T) { } func TestRepoViewFileLines(t *testing.T) { - onGiteaRun(t, func(t *testing.T, _ *url.URL) { + onApplicationRun(t, func(t *testing.T, _ *url.URL) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo, _, f := tests.CreateDeclarativeRepo(t, user, "file-lines", []unit_model.Type{unit_model.TypeCode}, nil, []*files_service.ChangeRepoFile{ { diff --git a/tests/integration/repo_watch_test.go b/tests/integration/repo_watch_test.go index 0bcb039b01..8d6af5b381 100644 --- a/tests/integration/repo_watch_test.go +++ b/tests/integration/repo_watch_test.go @@ -13,7 +13,7 @@ import ( ) func TestRepoWatch(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { // Test round-trip auto-watch setting.Service.AutoWatchOnChanges = true session := loginUser(t, "user2") diff --git a/tests/integration/repofiles_change_test.go b/tests/integration/repofiles_change_test.go index 42d47c4591..1c3f86d001 100644 --- a/tests/integration/repofiles_change_test.go +++ b/tests/integration/repofiles_change_test.go @@ -250,7 +250,7 @@ func getExpectedFileResponseForRepofilesUpdate(commitID, filename, lastCommitSHA } func TestChangeRepoFiles(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -414,7 +414,7 @@ func TestChangeRepoFiles(t *testing.T) { func TestChangeRepoFilesErrors(t *testing.T) { // setup - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) diff --git a/tests/integration/signing_git_test.go b/tests/integration/signing_git_test.go index 7018b10376..7fbda358cf 100644 --- a/tests/integration/signing_git_test.go +++ b/tests/integration/signing_git_test.go @@ -35,7 +35,7 @@ func TestInstanceSigning(t *testing.T) { require.NoError(t, git.InitFull(context.Background())) }) - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { defer test.MockVariableValue(&setting.Repository.Signing.SigningName, "UwU")() defer test.MockVariableValue(&setting.Repository.Signing.SigningEmail, "fox@example.com")() defer test.MockProtect(&setting.Repository.Signing.InitialCommit)() diff --git a/tests/integration/ssh_key_test.go b/tests/integration/ssh_key_test.go index a92694d2fa..156bcb137e 100644 --- a/tests/integration/ssh_key_test.go +++ b/tests/integration/ssh_key_test.go @@ -44,7 +44,7 @@ func doAddChangesToCheckout(dstPath, filename string) func(*testing.T) { } func TestPushDeployKeyOnEmptyRepo(t *testing.T) { - onGiteaRun(t, testPushDeployKeyOnEmptyRepo) + onApplicationRun(t, testPushDeployKeyOnEmptyRepo) } func testPushDeployKeyOnEmptyRepo(t *testing.T, u *url.URL) { @@ -88,7 +88,7 @@ func testPushDeployKeyOnEmptyRepo(t *testing.T, u *url.URL) { } func TestKeyOnlyOneType(t *testing.T) { - onGiteaRun(t, testKeyOnlyOneType) + onApplicationRun(t, testKeyOnlyOneType) } func testKeyOnlyOneType(t *testing.T, u *url.URL) { diff --git a/tests/integration/translations_test.go b/tests/integration/translations_test.go index 7b80025618..d20355aca2 100644 --- a/tests/integration/translations_test.go +++ b/tests/integration/translations_test.go @@ -44,7 +44,7 @@ func TestMissingTranslationHandling(t *testing.T) { // TestDataSizeTranslation is a test for usage of TrSize in file size display func TestDataSizeTranslation(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { testUser := "user2" testRepoName := "data_size_test" noDigits := regexp.MustCompile("[0-9]+") diff --git a/tests/integration/user_dashboard_test.go b/tests/integration/user_dashboard_test.go index fefe5f1399..146358158d 100644 --- a/tests/integration/user_dashboard_test.go +++ b/tests/integration/user_dashboard_test.go @@ -45,7 +45,7 @@ func testUserDashboardFeedType(t *testing.T, page *HTMLDoc, isEmpty bool) { } func TestDashboardTitleRendering(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) sess := loginUser(t, user4.Name) @@ -91,7 +91,7 @@ func TestDashboardTitleRendering(t *testing.T) { } func TestDashboardActionEscaping(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) sess := loginUser(t, user4.Name) @@ -126,7 +126,7 @@ func TestDashboardActionEscaping(t *testing.T) { } func TestDashboardReviewWorkflows(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) sess := loginUser(t, user4.Name) diff --git a/tests/integration/user_profile_test.go b/tests/integration/user_profile_test.go index 40d174eed9..654ff0c094 100644 --- a/tests/integration/user_profile_test.go +++ b/tests/integration/user_profile_test.go @@ -23,7 +23,7 @@ import ( ) func TestUserProfile(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { checkReadme := func(t *testing.T, title, readmeFilename string, expectedCount int) { t.Run(title, func(t *testing.T) { defer tests.PrintCurrentTest(t)() diff --git a/tests/integration/view_test.go b/tests/integration/view_test.go index 80371b84ce..0a210a5155 100644 --- a/tests/integration/view_test.go +++ b/tests/integration/view_test.go @@ -36,7 +36,7 @@ func TestRenderFileSVGIsInImgTag(t *testing.T) { } func TestAmbiguousCharacterDetection(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) @@ -132,7 +132,7 @@ func TestAmbiguousCharacterDetection(t *testing.T) { } func TestCommitListActions(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user2.Name) repo, commitID, f := tests.CreateDeclarativeRepo(t, user2, "", diff --git a/tests/integration/webhook_test.go b/tests/integration/webhook_test.go index 6d92a16dd8..3eef54f50c 100644 --- a/tests/integration/webhook_test.go +++ b/tests/integration/webhook_test.go @@ -25,7 +25,7 @@ import ( ) func TestWebhookPayloadRef(t *testing.T) { - onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + onApplicationRun(t, func(t *testing.T, giteaURL *url.URL) { w := unittest.AssertExistsAndLoadBean(t, &webhook_model.Webhook{ID: 1}) w.HookEvent = &webhook_module.HookEvent{ SendEverything: true, diff --git a/tests/integration/wiki_test.go b/tests/integration/wiki_test.go index 2949038f1f..47986177d7 100644 --- a/tests/integration/wiki_test.go +++ b/tests/integration/wiki_test.go @@ -34,7 +34,7 @@ func assertFileEqual(t *testing.T, p string, content []byte) { } func TestRepoCloneWiki(t *testing.T) { - onGiteaRun(t, func(t *testing.T, u *url.URL) { + onApplicationRun(t, func(t *testing.T, u *url.URL) { dstPath := t.TempDir() r := fmt.Sprintf("%suser2/repo1.wiki.git", u.String())