forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opensearch: add working opensearch manager
Add OpenSearch cluster manager. Adjust initial opensearch test to use pytest fixture. Add conftest with opensearch cluster fixture. Adjust opensearch dependency installation.
- Loading branch information
Showing
5 changed files
with
216 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Copyright (C) 2024-present ScyllaDB | ||
# | ||
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 | ||
# | ||
# This file configures pytest for all tests in this directory, and also | ||
# defines common test fixtures for all of them to use. | ||
from opensearchpy import OpenSearch | ||
import pytest | ||
import os | ||
|
||
@pytest.fixture(scope="function") | ||
async def opensearch(): | ||
host = os.environ.get('OPENSEARCH_ADDRESS') | ||
port = os.environ.get('OPENSEARCH_PORT') | ||
|
||
client = OpenSearch( | ||
hosts = [{'host': host, 'port': port}], | ||
http_compress = True, | ||
use_ssl = False, | ||
verify_certs = False, | ||
ssl_assert_hostname = False, | ||
ssl_show_warn = False | ||
) | ||
|
||
yield client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters