Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
  • Loading branch information
gaiksaya committed Aug 23, 2024
1 parent d52e7a2 commit d82b834
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/system/temporary_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def g__handleRemoveReadonly(func: FunctionType, path: str, exc: Any) -> Any:


class TemporaryDirectory:
def __init__(self, keep: bool = False, chdir: bool = False) -> None:
def __init__(self, keep: bool = True, chdir: bool = False) -> None:
self.keep = keep
if current_platform() == "windows":
windows_home_dir = os.path.expanduser('~')
Expand Down
3 changes: 3 additions & 0 deletions src/validation_workflow/tar/validation_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def installation(self) -> bool:
def start_cluster(self) -> bool:
try:
self.os_process.start(f'export OPENSEARCH_INITIAL_ADMIN_PASSWORD={get_password(str(self.args.version))} && ./opensearch-tar-install.sh', os.path.join(self.tmp_dir.path, "opensearch"))
execute('cat '+ os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), '.', True, False)
if ("opensearch-dashboards" in self.args.projects):
self.osd_process.start(os.path.join(str(self.tmp_dir.path), "opensearch-dashboards", "bin", "opensearch-dashboards"), ".")
logging.info('Started cluster')
Expand All @@ -45,6 +46,7 @@ def start_cluster(self) -> bool:
return True

def validation(self) -> bool:
execute('cat '+ os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), '.', True, False)
if self.check_cluster_readiness():
test_result, counter = ApiTestCases().test_apis(self.args.version, self.args.projects,
self.check_for_security_plugin(os.path.join(self.tmp_dir.path, "opensearch")) if self.args.allow_http else True)
Expand All @@ -60,6 +62,7 @@ def validation(self) -> bool:

def cleanup(self) -> bool:
try:
execute('cat '+ os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), '.', True, False)
self.os_process.terminate()
if ("opensearch-dashboards" in self.args.projects):
self.osd_process.terminate()
Expand Down

0 comments on commit d82b834

Please sign in to comment.