Conversation
- Create AzureSearchEmulator.IntegrationTests project with Testcontainers - Implement 8 comprehensive integration tests covering: - Index creation and deletion - Document indexing and retrieval - Search functionality with filtering, sorting, and paging - Use product/e-commerce domain with realistic test data - Add DebugClient project for local debugging/diagnostics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive integration testing infrastructure for the Azure Search Emulator using xUnit and Testcontainers, along with a debug client for manual testing and diagnostics.
- Implements 8 integration tests covering core Azure Search operations (index management, document indexing, search with filtering/sorting/paging)
- Adds Testcontainers-based test infrastructure to run tests against a containerized emulator instance
- Includes enhancements to the emulator codebase for better OData route handling, cache management, and wildcard query support
- Provides a DebugClient console application for local development and diagnostics
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| AzureSearchEmulator.IntegrationTests/EmulatorIntegrationTests.cs | Comprehensive integration tests covering index creation/deletion, document operations, and search functionality with various filters and options |
| AzureSearchEmulator.IntegrationTests/EmulatorFactory.cs | xUnit test fixture that manages Docker container lifecycle for the emulator using Testcontainers |
| AzureSearchEmulator.IntegrationTests/Product.cs | Test domain model representing e-commerce products for integration tests |
| AzureSearchEmulator.IntegrationTests/AzureSearchEmulator.IntegrationTests.csproj | Test project configuration with Azure SDK and Testcontainers dependencies |
| DebugClient/Program.cs | Console application for manual testing of emulator endpoints with comprehensive error handling |
| DebugClient/DebugClient.csproj | Debug client project configuration |
| AzureSearchEmulator/Searching/LuceneNetIndexSearcher.cs | Enhanced with wildcard query support and error handling for missing indexes |
| AzureSearchEmulator/SearchData/SimpleFSDirectoryFactory.cs | Added cache clearing functionality for proper resource cleanup on index deletion |
| AzureSearchEmulator/SearchData/LuceneDirectoryReaderFactory.cs | Added reader cache clearing for resource management |
| AzureSearchEmulator/Controllers/*.cs | Updated OData route patterns and added quote-stripping logic for URL parameters |
| AzureSearchEmulator/Program.cs | Improved HTTP request logging format |
| README.md | Added contributing guidelines and testing instructions |
| AzureSearchEmulator.sln | Added new test and debug client projects to solution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #17
🤖 Generated with Claude Code