Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Aug 23, 2024
1 parent a1e28a3 commit 965e688
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/validation_workflow/tar/validation_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +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"))
self.os_process.start(f'export OPENSEARCH_INITIAL_ADMIN_PASSWORD={get_password(str(self.args.version))} && ./opensearch-tar-install.sh >> install.log', os.path.join(self.tmp_dir.path, "opensearch"))
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 @@ -53,10 +53,12 @@ def validation(self) -> bool:
logging.info(f'All tests Pass : {counter}')
return True
else:
shutil.copy(os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), os.path.join('/tmp', 'opensearch.log'))
execute('cat ' + os.path.join(self.tmp_dir.path, 'opensearch', 'install.log'), ".")
# shutil.copy(os.path.join(self.tmp_dir.path, 'opensearch', 'install.log'), os.path.join('/tmp', 'opensearch.log'))
self.cleanup()
raise Exception(f'Not all tests Pass : {counter}')
else:
execute('cat ' + os.path.join(self.tmp_dir.path, 'opensearch', 'install.log'), ".")
shutil.copy(os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), os.path.join('/tmp', 'opensearch.log'))
self.cleanup()
raise Exception("Cluster is not ready for API test")
Expand Down

0 comments on commit 965e688

Please sign in to comment.