From 9d814dcf8b99e842ef8d676f18530c6d3206a16a Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:32:33 -0700 Subject: [PATCH] Update test_actions.py --- .../test_server/test_helpers/test_actions.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test_opensearchpy/test_server/test_helpers/test_actions.py b/test_opensearchpy/test_server/test_helpers/test_actions.py index 4d4bd893..c0b651c8 100644 --- a/test_opensearchpy/test_server/test_helpers/test_actions.py +++ b/test_opensearchpy/test_server/test_helpers/test_actions.py @@ -55,6 +55,23 @@ def bulk(self, *args: Any, **kwargs: Any) -> Any: raise self._fail_with return self.client.bulk(*args, **kwargs) +class Testfailingtest(OpenSearchTestCase): + def Testfailingtest(self) -> None: + # Create index with specified settings + self.client.indices.create( + index='test', + body={ + "settings": { + "index.number_of_shards": 2, + "index.number_of_replicas": 1 + } + } + ) + + # Perform force merge operation and verify total shards + response = self.client.indices.forcemerge(index='test', primary_only=True) + print("response printed", response printed) + assert response['_shards']['total'] == 2 class TestStreamingBulk(OpenSearchTestCase): def test_actions_remain_unchanged(self) -> None: