Adding comprehensive integration tests for oauth consolidation#470
Merged
cutecatfann merged 3 commits intomainfrom Apr 6, 2026
Merged
Adding comprehensive integration tests for oauth consolidation#470cutecatfann merged 3 commits intomainfrom
cutecatfann merged 3 commits intomainfrom
Conversation
austin5456
approved these changes
Apr 6, 2026
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.
What I did
I let Claude 4.6 Opus go wild with these tests! I did a review of the code and some edits (of course), but I think it did a pretty good job. I think the overview doc plus existing tests supported the AI well. However, it kept lying that it ran the tests + the CI locally... It would say that it ran all of the tests and all passed, then I would manually run to verify and something would fail
authorize, revoke, enable) plusworkingsetregistration, cleanup, mode determination, flag toggle, and mixed-mode operationcmd/docker-mcp/oauth/andcmd/docker-mcp/server/enable.go(same pattern aspkg/workingset/oauth.go) so routing tests run without Docker Desktop, docker pass, or a daemonmockDesktopModeinpkg/workingset/oauth_test.goto overrideshouldUseGatewayOAuthFunc, making existing Desktop-mode tests deterministic regardless of environmentRouting coverage
34 total new tests
pkg/oauth/(11 tests, 2 new files)flag_disable_test.go-- flag toggle, fallback, purity, provider mode cachingixed_mode_test.go-- simultaneous catalog+community, CE regression, docker pass fallbackcmd/docker-mcp/oauth/(12 tests, 2 new files)auth_test.go-- Authorize() routing for all mode combinations + catalog-lookup-failure fallbackrevoke_test.go-- Revoke() routing (same matrix)cmd/docker-mcp/server/(5 tests, 1 new file)enable_oauth_test.go-- Enable() OAuth routing: gateway-owned, desktop catalog, community+flagON, dynamic discoverypkg/workingset/(6 tests across existing files)oauth_mixed_mode_test.go-- mixed registration flagON/OFF, community dynamic discovery flagON/OFF, cleanup filteringdcr_cleanup_test.go-- CE mode early returnoauth_test.go --mockDesktopModefix (overridesshouldUseGatewayOAuthFunc`)🤖 Description generated with Claude Code and edited