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
parent
8fc36d0265
commit
4cb9ed6f3b
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue