Skip to content

Commit

Permalink
Added support for latest OpenSearch versions 2.7.0, 2.8.0 (opensearch…
Browse files Browse the repository at this point in the history
…-project#445)

Signed-off-by: saimedhi <saimedhi@amazon.com>
  • Loading branch information
saimedhi authored Jul 21, 2023
1 parent 5dc51d4 commit 5fa6d99
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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],
},
)
Expand All @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions test_opensearchpy/test_server_secured/test_security_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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],
},
)
Expand All @@ -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)
Expand Down

0 comments on commit 5fa6d99

Please sign in to comment.