Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 16 commits into from
Jun 18, 2024
Merged
Prev Previous commit
Next Next commit
Change to proper env var
Signed-off-by: Derek Ho <dxho@amazon.com>
  • Loading branch information
derek-ho committed Jun 18, 2024
commit ac76aaeecf77013f79b96b62928ecadf0355f901
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
env:
OPENSEARCH_URL: 'https://admin:myStrongPassword123!@localhost:9200'
ADMIN_PASSWORD: 'myStrongPassword123!'
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion test_opensearchpy/test_async/test_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def asyncSetUp(
self,
) -> None:
# pylint: disable=invalid-name,missing-function-docstring
password = os.environ.get("ADMIN_PASSWORD", "admin")
password = os.environ.get("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "admin")
self.client = await get_test_client(
verify_certs=False, http_auth=("admin", password)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TestSecurityPlugin(IsolatedAsyncioTestCase):

async def asyncSetUp(self) -> None:
# pylint: disable=invalid-name, missing-function-docstring
password = os.environ.get("ADMIN_PASSWORD", "admin")
password = os.environ.get("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "admin")
self.client = await get_test_client(
verify_certs=False, http_auth=("admin", password)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TestSecurityPlugin(TestCase):
USER_CONTENT = {"password": "opensearchpy@123", "opendistro_security_roles": []}

def setUp(self) -> None:
password = os.environ.get("ADMIN_PASSWORD", "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)

Expand Down
Loading