Pass in initial admin password and remove admin:admin references (#631)

* Update to pass in initial admin password

Signed-off-by: Derek Ho <[email protected]>

* Add changelog and logic to distinguish between versions

Signed-off-by: Derek Ho <[email protected]>

* fix syntax

Signed-off-by: Derek Ho <[email protected]>

* Revert tests

Signed-off-by: Derek Ho <[email protected]>

* Add 2.12 to the matrix and fix testing logic

Signed-off-by: Derek Ho <[email protected]>

* Fix version logic

Signed-off-by: Derek Ho <[email protected]>

* Try to split job into two batches

Signed-off-by: Derek Ho <[email protected]>

* Fix lint

Signed-off-by: Derek Ho <[email protected]>

* Change name

Signed-off-by: Derek Ho <[email protected]>

* Remove period

Signed-off-by: Derek Ho <[email protected]>

* Pull password dynamically

Signed-off-by: Derek Ho <[email protected]>

* Change to proper env var

Signed-off-by: Derek Ho <[email protected]>

* Try passing through

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
This commit is contained in:
Derek Ho
2024-06-18 11:44:21 -04:00
committed by GitHub
parent a1d27ca077
commit d3177a8bcb
10 changed files with 72 additions and 13 deletions
@@ -10,6 +10,7 @@
from __future__ import unicode_literals
import os
from unittest import TestCase
from opensearchpy.connection.connections import add_connection
@@ -36,7 +37,8 @@ class TestSecurityPlugin(TestCase):
USER_CONTENT = {"password": "opensearchpy@123", "opendistro_security_roles": []}
def setUp(self) -> None:
self.client = get_test_client(verify_certs=False, http_auth=("admin", "admin"))
password = os.environ.get("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "admin")
self.client = get_test_client(verify_certs=False, http_auth=("admin", password))
add_connection("default", self.client)
def tearDown(self) -> None: