Skip to content

5. Integration Tests for Multi-Catalog Mode #1039

Description

@MitchellShiell

Add integration test coverage for multi-catalog server operation, complementing the existing single-catalog suite in integration-tests/server/test/index.test.js.

Context

The existing integration tests spin up a single-catalog Arranger server and test GraphQL queries, aggregations, metadata, and sets. The TODO at integration-tests/server/test/index.test.js:57 notes: "will need to map through catalogs when multicatalog is implemented".

Acceptance Criteria

  • Test suite spins up an Arranger server with 2+ catalogs (e.g. models and imaging), each backed by a separate ES index
  • Verify GET /introspection returns mode: 'multi' with correct catalog entries
  • Verify POST /{catalogId}/graphql routes queries to the correct ES index for each catalog
  • Verify aggregations work independently per catalog
  • Verify downloads work at /{catalogId}/download
  • Verify that single-catalog mode (folder with JSONs, no subfolders) still passes all existing tests unchanged
  • Cleanup correctly removes all ES indices for all catalogs

Implementation Notes

  • Will need a second set of test data/mappings (e.g. an imaging dataset alongside the existing model_centric data)
  • Consider using config file fixtures (subfolder structure) rather than only programmatic config, to test the full config discovery path
  • The existing consumerMockApi (index.test.js:29) is hardcoded to /graphql — multi-catalog tests need per-catalog API clients targeting /{catalogId}/graphql

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions