Skip to content

Conversation

@jjones287
Copy link

Summary

This PR introduces integration testing infrastructure for the Search API using Testcontainers, REST Assured, and an embedded Jetty server.

Key changes:

  • Integration Test Infrastructure: Added Testcontainers support for PostgreSQL and OpenSearch
  • Search API Testing: Created EncounterExportImagesTest.java with partial coverage for the /api/v3/search/* endpoints
  • Dependency Injection Improvements: Refactored Shepherd and CommonConfiguration to accept configurable properties, enabling test database connections and configuration overrides
  • OpenSearch Refactoring: Extracted background indexing logic into separate public methods (updateEncounterIndexes(), updatePermissionsIndex()) and exposed initializeClient() to support test setup
  • Test Utilities: Added Annotation.setBbox() helper method for easier test data creation
  • Developer Experience: Modified pre-commit hook to prefer system uncrustify over bundled version

@jjones287 jjones287 force-pushed the feature/search-api-integration-test branch 2 times, most recently from 1bcf511 to e321335 Compare November 17, 2025 21:33
@jjones287 jjones287 force-pushed the feature/search-api-integration-test branch from e321335 to 9f70fdc Compare November 17, 2025 21:33
@jjones287
Copy link
Author

Apologies -- I noticed that I accidentally broke the existing tests because I changed the method signature of a method that was being mocked out. That should be fixed now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant