From 5fa6d994bd964c1e905da937e3e08c0032713e50 Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:08:09 -0700 Subject: [PATCH] Added support for latest OpenSearch versions 2.7.0, 2.8.0 (#445) Signed-off-by: saimedhi --- .github/workflows/integration.yml | 2 +- CHANGELOG.md | 1 + COMPATIBILITY.md | 6 +++--- .../test_async/test_server_secured/test_security_plugin.py | 6 +++--- .../test_server_secured/test_security_plugin.py | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8819d248..89d9f46c 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - opensearch_version: [ '1.0.1', '1.1.0', '1.2.4', '1.3.7', '2.0.1', '2.1.0', '2.2.1', '2.3.0', '2.4.0', '2.5.0', '2.6.0' ] + opensearch_version: [ '1.0.1', '1.1.0', '1.2.4', '1.3.7', '2.0.1', '2.1.0', '2.2.1', '2.3.0', '2.4.0', '2.5.0', '2.6.0', '2.7.0', '2.8.0' ] secured: [ "true", "false" ] steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d651101..fe80957e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added `Search#collapse` ([#409](https://github.com/opensearch-project/opensearch-py/issues/409)) - Added support for the ISM API ([#398](https://github.com/opensearch-project/opensearch-py/pull/398)) - Added `trust_env` to `AIOHttpConnection` ([#398](https://github.com/opensearch-project/opensearch-py/pull/438)) +- Added support for latest OpenSearch versions 2.7.0, 2.8.0 ([#445](https://github.com/opensearch-project/opensearch-py/pull/445)) ### Changed - Upgrading pytest-asyncio to latest version - 0.21.0 ([#339](https://github.com/opensearch-project/opensearch-py/pull/339)) diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index bae1cafb..91020855 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -9,9 +9,9 @@ The below matrix shows the compatibility of the [`opensearch-py`](https://pypi.o | --- | --- | --- | | 1.0.0 | 1.0.0-1.2.4 | | | 1.1.0 | 1.3.0-1.3.7 | | -| 2.0.x | 1.0.0-2.6.0 | client works against Opensearch Version 1.x as long as features removed in 2.0 are not used | -| 2.1.x | 1.0.0-2.6.0 | client works against Opensearch Version 1.x as long as features removed in 2.0 are not used | -| 2.2.0 | 1.0.0-2.6.0 | client works against Opensearch Version 1.x as long as features removed in 2.0 are not used | +| 2.0.x | 1.0.0-2.8.0 | client works against Opensearch Version 1.x as long as features removed in 2.0 are not used | +| 2.1.x | 1.0.0-2.8.0 | client works against Opensearch Version 1.x as long as features removed in 2.0 are not used | +| 2.2.0 | 1.0.0-2.8.0 | client works against Opensearch Version 1.x as long as features removed in 2.0 are not used | ## Upgrading diff --git a/test_opensearchpy/test_async/test_server_secured/test_security_plugin.py b/test_opensearchpy/test_async/test_server_secured/test_security_plugin.py index 7725f664..b5bfcdcc 100644 --- a/test_opensearchpy/test_async/test_server_secured/test_security_plugin.py +++ b/test_opensearchpy/test_async/test_server_secured/test_security_plugin.py @@ -38,7 +38,7 @@ class TestSecurityPlugin(IsolatedAsyncioTestCase): } USER_NAME = "test-user" - USER_CONTENT = {"password": "test_password", "opendistro_security_roles": []} + USER_CONTENT = {"password": "opensearchpy@123", "opendistro_security_roles": []} async def asyncSetUp(self): self.client = await get_test_client( @@ -113,7 +113,7 @@ async def test_create_user_with_role(self): response = await self.client.security.put_user( self.USER_NAME, body={ - "password": "test_password", + "password": "opensearchpy@123", "opendistro_security_roles": [self.ROLE_NAME], }, ) @@ -136,7 +136,7 @@ async def test_update_user(self): await self.test_create_user() user_content = self.USER_CONTENT.copy() - user_content["password"] = "password_test" + user_content["password"] = "123@opensearchpy" # Test to update user response = await self.client.security.put_user( diff --git a/test_opensearchpy/test_server_secured/test_security_plugin.py b/test_opensearchpy/test_server_secured/test_security_plugin.py index c158a9ae..2cdcc4a0 100644 --- a/test_opensearchpy/test_server_secured/test_security_plugin.py +++ b/test_opensearchpy/test_server_secured/test_security_plugin.py @@ -34,7 +34,7 @@ class TestSecurityPlugin(TestCase): } USER_NAME = "test-user" - USER_CONTENT = {"password": "test_password", "opendistro_security_roles": []} + USER_CONTENT = {"password": "opensearchpy@123", "opendistro_security_roles": []} def setUp(self): self.client = get_test_client(verify_certs=False, http_auth=("admin", "admin")) @@ -101,7 +101,7 @@ def test_create_user_with_role(self): response = self.client.security.put_user( self.USER_NAME, body={ - "password": "test_password", + "password": "opensearchpy@123", "opendistro_security_roles": [self.ROLE_NAME], }, ) @@ -124,7 +124,7 @@ def test_update_user(self): self.test_create_user() user_content = self.USER_CONTENT.copy() - user_content["password"] = "password_test" + user_content["password"] = "123@opensearchpy" # Test to update user response = self.client.security.put_user(self.USER_NAME, body=user_content)