Skip to content

Commit

Permalink
Test Recorder fix
Browse files Browse the repository at this point in the history
Signed-off-by: monusingh-1 <msnghgw@amazon.com>
  • Loading branch information
monusingh-1 committed Sep 21, 2023
1 parent 1a62673 commit 3831400
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test_workflow/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __save_test_result_data(self, termination_result: ServiceTerminationResult)
termination_result.log_files
)

self.save_logs.save_test_result_data(test_result_data)
# self.save_logs.save_test_result_data(test_result_data)

@property
def endpoint(self) -> str:
Expand Down
8 changes: 7 additions & 1 deletion src/test_workflow/test_recorder/test_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,20 @@ def _copy_log_files(self, log_files: dict, dest_directory: str) -> None:


class LocalClusterLogs(LogRecorder):

parent_class: TestRecorder



def __init__(self, parent_class: TestRecorder) -> None:
self.parent_class = parent_class
self.number_of_nodes = 0


def save_test_result_data(self, test_result_data: TestResultData) -> None:
base = self.parent_class._create_base_folder_structure(test_result_data.component_name, test_result_data.component_test_config)
dest_directory = os.path.join(base, "local-cluster-logs")
dest_directory = os.path.join(base, "local-cluster-logs/" + str(self.number_of_nodes))
self.number_of_nodes += 1
os.makedirs(dest_directory, exist_ok=True)
logging.info(
f"Recording local cluster logs for {test_result_data.component_name} with test configuration as "
Expand Down

0 comments on commit 3831400

Please sign in to comment.