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

Change password based on version in integtest health check #4331

Merged
merged 16 commits into from
Jan 9, 2024
3 changes: 2 additions & 1 deletion src/test_workflow/integ_test/service_opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(
self.dist = Distributions.get_distribution("opensearch", distribution, version, work_dir)
self.dependency_installer = dependency_installer
self.install_dir = self.dist.install_dir
self.password = 'myStrongPassword123!' if float('.'.join("3.0.0".split('.')[:2])) >= 2.12 else 'admin'
derek-ho marked this conversation as resolved.
Show resolved Hide resolved

def start(self) -> None:
self.dist.install(self.download())
Expand All @@ -65,7 +66,7 @@ def url(self, path: str = "") -> str:
def get_service_response(self) -> Response:
url = self.url("/_cluster/health")
logging.info(f"Pinging {url}")
return requests.get(url, verify=False, auth=("admin", "admin"))
return requests.get(url, verify=False, auth=("admin", self.password))

def __add_plugin_specific_config(self, additional_config: dict) -> None:
with open(self.opensearch_yml_path, "a") as yamlfile:
Expand Down
Loading