registry/tests/integration
Repository files (latest commit first)
Filename Latest commit message Latest commit date
adam jones 9d9a02c57f
Database implementation cleanup (#335)
## Motivation and Context

The database logic was getting a bit unwieldy and fragile - especially
because business logic that should really have lived at the registry
service level was being pushed into the persistence level.

This PR tightens the interface, simplifies the code there, as well as
rips out a bunch of mocks etc. we don't need.

## How Has This Been Tested?

Locally everything works

## Breaking Changes

The list endpoint was surprisingly always filtering for isLatest only,
which seems like a bug? I have removed this filter.
2025-09-02 13:37:28 +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 Database implementation cleanup (#335) 2025-09-02 13:37:28 +01:00
README.md auth: New auth flow (#273) 2025-08-15 13:03:35 +01:00
run.sh Move publisher CLI from tools/ to cmd/ (#326) 2025-08-29 14:45:36 +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