Regression tests for collab server - #961
Merged
Merged
Conversation
These address issue 959
🤖 Augment PR SummarySummary: This PR adds a focused regression check for the collaboration server's GraphQL authorization header.
🤖 Was this summary useful? React with 👍 or 👎 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a small regression test harness for the collaboration server’s Hasura GraphQL client, aimed at preventing a repeat of the “No Authorization header found” failure mode described in issue #959.
Changes:
- Refactors collab server GraphQL client creation into a dedicated
createCollabGqlClient()helper. - Adds a Node/Vite-built regression test that asserts the outgoing GraphQL request includes the expected
Authorization: Bearer …header. - Wires the test into
javascript/package.jsonvia a newtest:collab-graphql-authscript and ignores the build output directory.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| javascript/vite.config.collab_client_test.ts | Adds a Vite build config to bundle the collab GraphQL auth regression test for Node execution. |
| javascript/src/collab_server/index.ts | Switches the collab server to use the new shared GraphQL client factory. |
| javascript/src/collab_server/graphql_client.ts | Introduces a reusable Hasura Apollo client factory that injects the collaboration JWT into the Authorization header. |
| javascript/src/collab_server/graphql_client.test.ts | Adds a regression test that spins up a local HTTP server and asserts the auth header is sent. |
| javascript/package.json | Adds an npm script to build/run the regression test. |
| javascript/.gitignore | Ignores the new test build output directory. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes add some regression tests relevant to issue #959.