From ab636dc5e140ec4de90f25756f0e05370962651a Mon Sep 17 00:00:00 2001 From: salvacybersec Date: Mon, 6 Apr 2026 01:15:51 +0300 Subject: [PATCH] fix(10-02): stabilize GitHubSource provider-name test --- pkg/recon/sources/github_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/recon/sources/github_test.go b/pkg/recon/sources/github_test.go index cbe8ce6..6b9f856 100644 --- a/pkg/recon/sources/github_test.go +++ b/pkg/recon/sources/github_test.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "errors" - "fmt" "net/http" "net/http/httptest" "strings" @@ -144,8 +143,8 @@ func TestGitHubSource_ProviderNameFromKeyword(t *testing.T) { // Track which query came in so we can assert providerName mapping per-call. srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - q := r.URL.Query().Get("q") - body := fmt.Sprintf(`{"items":[{"html_url":"https://example/%s","repository":{"full_name":"o/r"}}]}`, q) + // Query contains spaces/quotes — don't interpolate it into JSON. + body := `{"items":[{"html_url":"https://example/x","repository":{"full_name":"o/r"}}]}` w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(body)) }))