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
@@ -25,6 +25,7 @@
# under the License.
import os
from unittest import IsolatedAsyncioTestCase
from opensearchpy._async.helpers.test import get_test_client
@@ -38,8 +39,9 @@ class AsyncOpenSearchTestCase(IsolatedAsyncioTestCase):
self,
) -> None:
# pylint: disable=invalid-name,missing-function-docstring
password = os.environ.get("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "admin")
self.client = await get_test_client(
verify_certs=False, http_auth=("admin", "admin")
verify_certs=False, http_auth=("admin", password)
)
await add_connection("default", self.client)