Commit 7b8b7e0
Register default Copilot user in Java e2e harness to fix MCP tests
CLI 1.0.64-1 gates MCP enablement on the /copilot_internal/user response.
Commit 9d696d2 routed that call directly to the replay proxy via
COPILOT_DEBUG_GITHUB_API_URL, but the Java harness never registered a
default user for the CLI's default token, so the proxy returned 401 'Bad
credentials'. With no user, the third-party MCP policy resolver could not
early-return allow-all and the MCP servers never reached CONNECTED, timing
out McpAndAgentsTest after 60s.
Register a default 'individual_pro' user at E2ETestContext.create(), matching
the Go, Node, Python, and .NET harnesses. The proxy adds is_mcp_enabled:true
(the global gate) and the snake_case copilot_plan makes the resolver
early-return allow-all for non-org plans, avoiding a /copilot/mcp_registry
call the proxy does not serve.
Add a raw-map setCopilotUserByToken overload to CapiProxy so the registered
user uses the same snake_case field shape the CLI reads; the existing 6-arg
camelCase overload (used by per-session auth tests) is unchanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent d487453 commit 7b8b7e0
2 files changed
Lines changed: 74 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
293 | 340 | | |
294 | 341 | | |
295 | 342 | | |
| |||
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| |||
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
100 | 123 | | |
101 | 124 | | |
102 | 125 | | |
| |||
282 | 305 | | |
283 | 306 | | |
284 | 307 | | |
285 | | - | |
286 | | - | |
| 308 | + | |
| 309 | + | |
287 | 310 | | |
288 | 311 | | |
289 | 312 | | |
| |||
298 | 321 | | |
299 | 322 | | |
300 | 323 | | |
301 | | - | |
| 324 | + | |
302 | 325 | | |
303 | 326 | | |
304 | 327 | | |
| |||
323 | 346 | | |
324 | 347 | | |
325 | 348 | | |
326 | | - | |
| 349 | + | |
327 | 350 | | |
328 | 351 | | |
329 | 352 | | |
| |||
0 commit comments