registry/tests/integration
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Radoslav Dimitrov 8d7e471fd3
Allow for vendor extensions on servers (#298)
<!-- Provide a brief summary of your changes -->
This PR serves as a placeholder and brings together all of the changes
related to supporting vendor extensions passed through the API. The idea
is to have a single place to track and review the work as it comes
together (even if it’s still a bit of a work in progress).

**The changes in this PR cover:**
* Updates on the data model
* Updates on both databases (in-memory and postgresql), added a new
table to PSQL for tracking the extensions leaving the server table only
for the clean server.json properties
* Updates the seed.json file (thus the big line change)
* Adds a seed-migrate tool to help migrating an existing seed file to
the new format
* Updates the seed import mechanism to support this
* Updates the existing tests - unit, integration and validation tests
* Adds the publish handler to the OpenAPI spec (it was missing)
* Fixes linting errors
* Updates on the API side on (publish, list, get) to support the new
format of `ServerResponse` -
```
{
  "server": {},
  "x-io.modelcontextprotocol.registry": {}, /*not available for publish since this gets populated by the registry*/
  "x-publisher": {}
}
```

## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->
Motivated by the discussions in:
https://github.com/modelcontextprotocol/registry/discussions/284

## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->
Locally and by running all of the tests

## Breaking Changes
<!-- Will users need to update their code or configurations? -->
Yes, it changes both the API and the format of the seed file
 
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

---

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Co-authored-by: adam jones <domdomegg+git@gmail.com>
2025-08-23 09:59:03 +01:00
..
docker-compose.integration-test.yml Refactor database implementation to use PostgreSQL instead of MongoDB (#289) 2025-08-22 01:40:28 +01:00
main.go Allow for vendor extensions on servers (#298) 2025-08-23 09:59:03 +01:00
README.md auth: New auth flow (#273) 2025-08-15 13:03:35 +01:00
run.sh feat: Add creds for GitHub auth, add "none" auth to publisher (#276) 2025-08-18 15:49:04 +01:00

Integration Test

This directory contains an end-to-end test for publishing to the registry.

What the Test Covers

  1. Publisher Tool: Tests the publisher CLI that publishes metadata to the registry
  2. Registry API: Validates the /v0/publish and /v0/servers/{id} endpoints work correctly
  3. Example Validation: Ensures all example JSON in docs/server-json/examples.md is valid and can be published
  4. Data Consistency: Verifies published data matches what's retrieved from the registry

Test Flow

  1. Build: Build publisher and registry
  2. Start Services: Launch registry and MongoDB using Docker Compose with test configuration
  3. Publish Examples: Extract JSON examples from documentation and run publisher to publish each one
  4. Validate Responses: GET each published server from the registry and compare it to the example JSON
  5. Cleanup: Stop Docker containers and remove temporary files

How to Run

Prerequisites

  • Docker and Docker Compose
  • Go 1.24
  • Make sure you're in the repository root directory

Run the Tests

./tests/integration/run.sh