Feature: Integration test for solr designed for future expansion with more test cases #11671
+268
−0
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.
Closes #11651
Implements integration test infrastructure for Solr as requested. This allows running tests against a real Solr Docker container to verify search behavior like rankings, sort orderings, and other Solr configuration.
Technical
Files Created:
openlibrary/tests/solr/integration/__init__.py- Package initialization [empty as all structure]openlibrary/tests/solr/integration/conftest.py- Pytest fixtures for Solr container managementopenlibrary/tests/solr/integration/helpers.py- Utility functions for testsopenlibrary/tests/solr/integration/test_author_search.py- First test casetest_author_search_sort_by_name - Currently skipped test that documents the incorrect behavior of the sort=name option
Key Implementation Details:
Testing
you can run all test. also can run specific integration test
Expected output: 1 skipped (the author search test is intentionally skipped)
Note:
The
test_author_search_sort_by_nametest is intentionally skipped with @pytest.mark.skip. It documents the current incorrect behavior of the name sort option. Once the underlying issue is fixed, the skip can be removed and the test should pass.Stakeholders
@cdrini