fix(test): use resolvable URLs in MCP service update test

UpdateMCPService now validates outbound URLs for SSRF; subdomains like
before.example.com fail DNS resolution and break App CI.
main
wizardchen 2026-08-10 19:18:46 +08:00 committed by lyingbug
parent 8fc36d0265
commit 4cb9ed6f3b
1 changed files with 4 additions and 2 deletions

View File

@ -183,11 +183,13 @@ func TestUpdateMCPService_AppliesNonScalarUpdateWithoutName(t *testing.T) {
ctx := context.Background()
svc, repo := newTestService()
id := seedService(t, repo, "stored-api", "stored-token")
beforeURL := "https://before.example.com"
// Use resolvable example.com paths: subdomains like before.example.com fail
// SSRF DNS checks because they do not resolve to a public IP.
beforeURL := "https://example.com/before"
repo.store[id].Description = "before"
repo.store[id].URL = &beforeURL
afterURL := "https://after.example.com"
afterURL := "https://example.com/after"
update := &types.MCPService{
ID: id,
TenantID: 1,