diff --git a/tests/scripts/remote_monitoring_tests/rest_apis/test_update_results.py b/tests/scripts/remote_monitoring_tests/rest_apis/test_update_results.py index d37190109..4253ed3fd 100644 --- a/tests/scripts/remote_monitoring_tests/rest_apis/test_update_results.py +++ b/tests/scripts/remote_monitoring_tests/rest_apis/test_update_results.py @@ -481,13 +481,12 @@ def test_update_results_with_same_result(cluster_type): interval_end_time = result_json_data[0]['interval_end_time'] interval_start_time = result_json_data[0]['interval_start_time'] - TIMESTAMP_PRESENT_MSG = 'A record with the name %s already exists within the timestamp range starting ' \ - 'from %s and ending on %s.' % (experiment_name, interval_start_time, interval_end_time) + TIMESTAMP_PRESENT_MSG = 'An entry for this record already exists!' print(TIMESTAMP_PRESENT_MSG) - print(data['data'][0]['errorReasons'][0]) + print(data['data'][0]['errors']["409"]) assert data['message'] == 'Out of a total of 1 records, 1 failed to save' - assert data['data'][0]['errorReasons'][0] == TIMESTAMP_PRESENT_MSG + assert data['data'][0]['errors']["409"] == TIMESTAMP_PRESENT_MSG response = delete_experiment(input_json_file) print("delete exp = ", response.status_code) @@ -535,12 +534,12 @@ def test_update_results_with_valid_and_invalid_interval_duration(test_name, inte assert response.status_code == ERROR_STATUS_CODE assert data['status'] == ERROR_STATUS assert data['message'] == 'Out of a total of 1 records, 1 failed to save' - assert data['data'][0]['errorReasons'][0] == UPDATE_RESULTS_DATE_PRECEDE_ERROR_MSG + assert data['data'][0]['errors']['400'] == UPDATE_RESULTS_DATE_PRECEDE_ERROR_MSG else: assert response.status_code == ERROR_STATUS_CODE assert data['status'] == ERROR_STATUS assert data['message'] == 'Out of a total of 1 records, 1 failed to save' - assert data['data'][0]['errorReasons'][0] == INVALID_INTERVAL_DURATION_MSG + assert data['data'][0]['errors']['400'] == INVALID_INTERVAL_DURATION_MSG response = delete_experiment(input_json_file) print("delete exp = ", response.status_code)