0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-01-25 23:45:54 +01:00
This commit is contained in:
Lunny Xiao 2026-01-15 11:34:08 -08:00
parent 4c37b6f088
commit 5ba7058039
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -469,7 +469,6 @@ func Test_WebhookPushBranchPatternGlob(t *testing.T) {
}
for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
var payloads []api.PushPayload
var triggeredEvent string
@ -497,7 +496,7 @@ func Test_WebhookPushBranchPatternGlob(t *testing.T) {
payloads = nil
triggeredEvent = ""
nonMatchFile := fmt.Sprintf("test_webhook_push_glob_%s_nonmatch.md", slug)
testCreateFile(t, session, "user2", "repo1", tc.nonMatchBranch, "", nonMatchFile, fmt.Sprintf("# push filtered by glob %s", tc.name))
testCreateFile(t, session, "user2", "repo1", tc.nonMatchBranch, "", nonMatchFile, "# push filtered by glob "+tc.name)
assert.Empty(t, triggeredEvent)
assert.Empty(t, payloads)
}
@ -520,7 +519,7 @@ func Test_WebhookPushBranchPatternGlob(t *testing.T) {
assert.NoError(t, err)
}
testCreateFile(t, session, "user2", "repo1", tc.matchBranch, "", matchFile, fmt.Sprintf("# push allowed by glob %s", tc.name))
testCreateFile(t, session, "user2", "repo1", tc.matchBranch, "", matchFile, "# push allowed by glob "+tc.name)
var afterCommitID string
if tc.verifyCommits {