lol
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
testing / backend-checks (pull_request) Successful in 5m55s
ci/woodpecker/push/build Pipeline was successful
testing / frontend-checks (pull_request) Successful in 1m39s
/ release-notes (pull_request_target) Has been skipped
testing / test-unit (pull_request) Successful in 8m22s
testing / test-e2e (pull_request) Successful in 2m52s
testing / test-remote-cacher (map[image:docker.io/bitnami/redis:7.2 port:6379]) (pull_request) Has been cancelled
testing / test-remote-cacher (map[image:docker.io/bitnami/valkey:7.2 port:6379]) (pull_request) Has been cancelled
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (pull_request) Has been cancelled
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (pull_request) Has been cancelled
testing / test-pgsql (pull_request) Has been cancelled
testing / test-sqlite (pull_request) Has been cancelled
testing / security-check (pull_request) Has been cancelled
testing / test-mysql (pull_request) Has been cancelled

This commit is contained in:
Tom Neuber 2024-10-27 01:56:00 +02:00
parent 9a366d607f
commit 308c74b402
Signed by: tom
GPG key ID: F17EFE4272D89FF6

View file

@ -882,6 +882,7 @@ func testPullAutoMergeAfterCommitStatusSucceed(t *testing.T, forkName string, ap
"enable_push": "true",
"enable_status_check": "true",
"status_check_contexts": "gitea/actions",
"required_approvals": "0",
}
if approval {
reqParams["required_approvals"] = "1"
@ -900,12 +901,12 @@ func testPullAutoMergeAfterCommitStatusSucceed(t *testing.T, forkName string, ap
}
// first time insert automerge record, return true
scheduled, err := automerge.ScheduleAutoMerge(db.DefaultContext, user1, pr, repo_model.MergeStyleMerge, "auto merge test", false)
scheduled, err := automerge.ScheduleAutoMerge(db.DefaultContext, user1, pr, repo_model.MergeStyleMerge, "auto merge test", deleteBranch)
require.NoError(t, err)
assert.True(t, scheduled)
// second time insert automerge record, return false because it does exist
scheduled, err = automerge.ScheduleAutoMerge(db.DefaultContext, user1, pr, repo_model.MergeStyleMerge, "auto merge test", false)
scheduled, err = automerge.ScheduleAutoMerge(db.DefaultContext, user1, pr, repo_model.MergeStyleMerge, "auto merge test", deleteBranch)
require.Error(t, err)
assert.False(t, scheduled)
@ -955,7 +956,7 @@ func testPullAutoMergeAfterCommitStatusSucceed(t *testing.T, forkName string, ap
time.Sleep(2 * time.Second)
}
// realod pr again
// reload pr again
pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: pr.ID})
assert.True(t, pr.HasMerged)
assert.NotEmpty(t, pr.MergedCommitID)