OpenMetadata
OpenMetadata copied to clipboard
Fix- SearchMetadataToolTest failing
Description
SearchMetadataToolTest has been failing on main branch with PotentialStubbingProblem errors. The unit test mocks are outdated and don't match current SearchMetadataTool behavior.
Issue
The tests mock searchRepository.getIndexOrAliasName() with old index names:
- Expected:
table_search_index,dashboard_search_index - Actual:
dataAsset,dashboard
Impact
- Tests were disabled in #25092 to unblock camelCase standardization
- No unit test coverage for SearchMetadataTool
- McpToolsValidationTest provides integration coverage
Fix Required
Update SearchMetadataToolTest mocking to use correct index names matching SearchMetadataTool.java behavior.
Related
- Disabled in commit 29f19015b
- Integration tests work correctly