-
Notifications
You must be signed in to change notification settings - Fork 559
Tests and linters #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…nce error handling
…ons as much as possible. Fix the tests to let the DB generate the server uuids rather than setting them up in the test.
- Added error handling for JSON encoding in ServersHandler and ServersDetailHandler. - Updated test cases to reflect changes in handler functions and improved mock expectations. - Refactored server initialization to include ReadHeaderTimeout for better request handling. - Modified GitHubDeviceAuth to accept context in ValidateToken and checkOrgMembership methods. - Improved error messages in database import functions for better debugging. - Updated memory and mongo database list functions to accept context and improved filtering logic. - Enhanced logging in publisher tool for better visibility during execution. - Cleaned up code formatting and comments for better readability and maintainability.
toby
approved these changes
May 28, 2025
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.
This pull request introduces significant improvements to the CI/CD pipeline, error handling, and code quality across multiple files. Key highlights include the addition of comprehensive GitHub Actions workflows for CI tasks, enhanced error handling in API responses, and the adoption of stricter linting rules. Below is a detailed breakdown of the most important changes.
CI/CD Enhancements:
.github/workflows/ci.yml: Added a comprehensive CI pipeline with linting, formatting, build checks, unit tests, integration tests, and a test summary step. This ensures automated validation of code changes..github/workflows/unit-tests.yml: Created a dedicated workflow for running unit tests, including coverage reports and artifact uploads..github/workflows/integration-tests.yml: Added a separate workflow for integration tests, including coverage reporting and artifacts for detailed test results.Code Quality Improvements:
.golangci.yml: Introduced a detailed configuration forgolangci-lintto enable multiple linters and customize settings for code complexity, line length, and exclusions.Error Handling Enhancements:
internal/api/handlers/v0/auth.go: Improved error handling in JSON encoding by adding checks and returning appropriate HTTP error responses. [1] [2] [3]internal/api/handlers/v0/health.go: Added error handling for encoding health check responses and corrected a field name for consistency (GitHubClientId→GitHubClientID).Integration Test Documentation:
integrationtests/README.md: Documented the structure, benefits, and execution of integration tests for the MCP Registry API, providing clarity for contributors and maintainers.integrationtests/run_tests.sh: Added a script to streamline the execution of integration tests with verbose output and failure handling.Dependency Updates:
go.mod: Added new dependencies (testify,go-spew,go-difflib,objx) to support enhanced testing and debugging capabilities. [1] [2]