Skip to content

Commit

Permalink
Add feature check for scoped analyze_document in tests (#555)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergey Avseyev <[email protected]>
  • Loading branch information
DemetrisChr and avsej authored Apr 15, 2024
1 parent ed19c54 commit b85bfeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_integration_management.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4869,8 +4869,8 @@ TEST_CASE("integration: scope search index management analyze document public AP
{
test::utils::integration_test_guard integration;

if (!integration.cluster_version().supports_scope_search()) {
SKIP("cluster does not support scope search");
if (!integration.cluster_version().supports_scope_search_analyze()) {
SKIP("cluster does not support scoped analyze_document");
}

if (integration.cluster_version().is_capella()) {
Expand Down
6 changes: 6 additions & 0 deletions test/utils/server_version.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ struct server_version {
return (major == 7 && minor >= 6) || major > 7;
}

[[nodiscard]] bool supports_scope_search_analyze() const
{
// Scoped endpoint for analyze_document added in 7.6.2 (MB-60643)
return (major == 7 && minor == 6 && micro >= 2) || (major == 7 && minor > 6) || major > 7;
}

[[nodiscard]] bool is_enterprise() const
{
return edition == server_edition::enterprise;
Expand Down

0 comments on commit b85bfeb

Please sign in to comment.