From 24f4cb84d9d27b58a38ba55332541de66d022544 Mon Sep 17 00:00:00 2001 From: jpike Date: Wed, 19 Mar 2025 10:48:27 -0400 Subject: [PATCH] Upload start and end times for the result We need to update the start and end time of the test Change-Id: I42f99a024ca056a5adb4ba2568b1c474f4620ffa --- .../operations/test_case_result_operation.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/framework/database/operations/test_case_result_operation.py b/framework/database/operations/test_case_result_operation.py index cba1d289..1a4ee655 100644 --- a/framework/database/operations/test_case_result_operation.py +++ b/framework/database/operations/test_case_result_operation.py @@ -13,12 +13,12 @@ class TestCaseResultOperation: def create_test_case_result(self, test_case_result: TestCaseResult): """ Creates a test case result in the database - Args: - test_case_result (): - Returns: + Args: + test_case_result (TestCaseResult): the test case result """ + # fmt: off create_test_case_result = ( "INSERT INTO test_case_result (test_info_id, execution_result, start_time, end_time, test_run_execution_id, log_hostname, log_location) " f"VALUES ({test_case_result.test_info_id}, '{test_case_result.execution_result}', '{test_case_result.start_time}', " @@ -30,17 +30,19 @@ class TestCaseResultOperation: def update_test_case_result(self, test_case_result: TestCaseResult): """ Updates a test case result in the database - Args: - test_case_result (): - Returns: + Args: + test_case_result (TestCaseResult): the testcase result """ + # fmt: off create_test_case_result = ( "UPDATE test_case_result " f"SET execution_result='{test_case_result.get_execution_result()}', " f"log_hostname='{test_case_result.log_hostname}', " - f"log_location='{test_case_result.log_location}' " + f"log_location='{test_case_result.log_location}', " + f"start_time='{test_case_result.start_time}', " + f"end_time='{test_case_result.end_time}' " f"WHERE test_case_result_id={test_case_result.get_test_case_result_id()}" )