6f26eb3e8e
* remove unnecessary utf-8 header in .py files Signed-off-by: samuel orji <awesomeorji@gmail.com> * review feedback: add link to changelog Signed-off-by: samuel orji <awesomeorji@gmail.com> --------- Signed-off-by: samuel orji <awesomeorji@gmail.com>
30 lines
866 B
Python
30 lines
866 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# The OpenSearch Contributors require contributions made to
|
|
# this file be licensed under the Apache-2.0 license or a
|
|
# compatible open source license.
|
|
#
|
|
# Modifications Copyright OpenSearch Contributors. See
|
|
# GitHub history for details.
|
|
|
|
from unittest import TestCase
|
|
|
|
from opensearchpy import OpenSearch
|
|
from opensearchpy.helpers.test import OPENSEARCH_URL
|
|
|
|
|
|
class TestSecurity(TestCase):
|
|
def test_security(self) -> None:
|
|
client = OpenSearch(
|
|
OPENSEARCH_URL,
|
|
http_auth=("admin", "admin"),
|
|
verify_certs=False,
|
|
)
|
|
|
|
info = client.info()
|
|
self.assertNotEqual(info["version"]["number"], "")
|
|
self.assertNotEqual(info["tagline"], "")
|
|
self.assertTrue(
|
|
"build_flavor" in info["version"] or "distribution" in info["version"]
|
|
)
|