don't send request to example.com

This commit is contained in:
wxiaoguang
2026-04-25 14:57:43 +08:00
parent 17cca5ca21
commit 7a1f463525

View File

@@ -48,7 +48,7 @@ func testWebhookPrepare(t *testing.T) {
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
hook := &webhook_model.Webhook{
RepoID: repo.ID,
URL: "https://www.example.com/prepare_webhooks",
URL: "http://localhost/gitea-webhook-test-prepare_webhooks",
ContentType: webhook_model.ContentTypeJSON,
Events: `{"push_only":true}`,
IsActive: true,
@@ -66,7 +66,7 @@ func testWebhookPrepareBranchFilterMatch(t *testing.T) {
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
hook := &webhook_model.Webhook{
RepoID: repo.ID,
URL: "https://www.example.com/branch_filter_match",
URL: "http://localhost/gitea-webhook-test-branch_filter_match",
ContentType: webhook_model.ContentTypeJSON,
Events: `{"push_only":true,"branch_filter":"{master,feature*}"}`,
IsActive: true,
@@ -85,7 +85,7 @@ func testWebhookPrepareBranchFilterNoMatch(t *testing.T) {
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
hook := &webhook_model.Webhook{
RepoID: repo.ID,
URL: "https://www.example.com/branch_filter_no_match",
URL: "http://localhost/gitea-webhook-test-branch_filter_no_match",
ContentType: webhook_model.ContentTypeJSON,
Events: `{"push_only":true,"branch_filter":"{master,feature*}"}`,
IsActive: true,