Skip to content

Commit fcfed11

Browse files
Copilotlpcox
andauthored
test: add explicit /api/graphql proxy coverage in handler test
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/c6b2a362-0e12-4612-9786-e6d4c9c0687c Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 13b03eb commit fcfed11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

internal/proxy/handler_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,10 @@ func TestServeHTTP_GraphQLPreservesQueryString(t *testing.T) {
195195
wantPath string
196196
}{
197197
{name: "graphql path", path: "/graphql?foo=bar", wantPath: "/graphql?foo=bar"},
198-
{name: "ghes api graphql path", path: "/api/graphql?foo=bar", wantPath: "/graphql?foo=bar"},
199-
{name: "gh host prefixed graphql path", path: "/api/v3/graphql?foo=bar", wantPath: "/graphql?foo=bar"},
198+
{name: "ghes api graphql path", path: "/api/graphql", wantPath: "/graphql"},
199+
{name: "ghes api graphql path with query", path: "/api/graphql?foo=bar", wantPath: "/graphql?foo=bar"},
200+
{name: "gh host prefixed graphql path", path: "/api/v3/graphql", wantPath: "/graphql"},
201+
{name: "gh host prefixed graphql path with query", path: "/api/v3/graphql?foo=bar", wantPath: "/graphql?foo=bar"},
200202
}
201203

202204
for _, tt := range tests {

0 commit comments

Comments
 (0)