test(security-scan-profiles): Validate GraphQL request structure

Summary

Follow-up to !2932 (merged), addressing review feedback: the SecurityScanProfiles tests only asserted on the mocked response payload, not on the request the client actually sends. Adds request-structure assertions (query + variables) to each test, and a small testGraphQLRequestBody helper alongside GraphQLQuery for reuse by other GraphQL service tests.

Test plan

  • go test . -run TestSecurityScanProfiles passes
  • go test . -run TestGraphQL passes
  • Verified the new assertions actually catch a mismatch (temporarily broke a variable name in security_scan_profiles.go and confirmed the test failed with a precise diff, then reverted)

Merge request reports

Loading