Skip to content

Commit

Permalink
Add strong password check on cluster connection
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <[email protected]>
  • Loading branch information
rishabh6788 committed Dec 23, 2023
1 parent 0eccf7f commit aee8f4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test_workflow/benchmark_test/benchmark_test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ def terminate(self) -> None:
subprocess.check_call(command, cwd=os.getcwd(), shell=True)

def wait_for_processing(self, tries: int = 3, delay: int = 15, backoff: int = 2) -> None:
password = 'myStrongPassword123!' if semver.compare(self.distribution_version, '2.12.0') != -1 else 'admin'
logging.info(f"Waiting for domain at {self.endpoint} to be up")
protocol = "http://" if self.args.insecure else "https://"
url = "".join([protocol, self.endpoint, "/_cluster/health"])
request_args = {"url": url} if self.args.insecure else {"url": url, "auth": HTTPBasicAuth("admin", "admin"), # type: ignore
request_args = {"url": url} if self.args.insecure else {"url": url, "auth": HTTPBasicAuth("admin", password), # type: ignore
"verify": False} # type: ignore
retry_call(requests.get, fkwargs=request_args,
tries=tries, delay=delay, backoff=backoff)
Expand Down

0 comments on commit aee8f4f

Please sign in to comment.