End-to-end publish test using examples from docs#199
Merged
chlowell merged 8 commits intomodelcontextprotocol:mainfrom Jul 25, 2025
Merged
End-to-end publish test using examples from docs#199chlowell merged 8 commits intomodelcontextprotocol:mainfrom
chlowell merged 8 commits intomodelcontextprotocol:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
chlowell
commented
Jul 24, 2025
Contributor
Author
There was a problem hiding this comment.
The delta here is the tests from integrationtests/publish_integration_test.go, tweaked to use the slightly different mocks defined in this file
tadasant
approved these changes
Jul 25, 2025
Member
tadasant
left a comment
There was a problem hiding this comment.
This is awesome, thank you! Looks great.
domdomegg
pushed a commit
that referenced
this pull request
Aug 7, 2025
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.
Closes #105 by adding an end-to-end test that uses
publisherto publish examples fromdocs/server-json/examples.mdto a live local registry so we can have some confidence that the examples are valid andpublisherandregistrywork together.sample output
To make this possible in a local dev loop without modifying (much of) the registry's internals, I added a build tag that disables registry auth. Gating this feature behind a build tag makes it hard to enable accidentally and ensures the no-auth code doesn't exist in normal builds, and
registryprints a warning when auth was disabled at build time. I also tweakedpublisherto return a nonzero exit code when an operation fails.Running the test exposed a bug fixed in this PR: a couple mongo operations used
versiondetailin a key whereas theServermodel usesversion_detail.I did a little reorganizing as well by moving the publish handler tests in
/integrationtests, which rely on mocking internal implementations, into the existing unit test suite.Types of changes
Checklist