@@ -239,45 +239,15 @@ func ToNormalTestCaseResult(testCaseResult *TestCaseResult) (result testing.Test
239239}
240240
241241func  ToGRPCHistoryTestCaseResult (historyTestResult  testing.HistoryTestResult ) (result  * HistoryTestResult ) {
242- 	res  :=  historyTestResult .Data .Data .Request 
243- 	resp  :=  historyTestResult .Data .Data .Expect 
244- 	
242+ 	convertedHistoryTestCase  :=  ConvertToGRPCHistoryTestCase (historyTestResult .Data )
243+ 
245244	result  =  & HistoryTestResult {
246245		Message :    historyTestResult .Message ,
247246		Error :      historyTestResult .Error ,
248247		CreateTime : timestamppb .New (historyTestResult .CreateTime ),
249- 
250- 		Data : & HistoryTestCase {
251- 			HistorySuiteName : historyTestResult .Data .HistorySuiteName ,
252- 			CaseName :         historyTestResult .Data .CaseName ,
253- 			CreateTime :       timestamppb .New (historyTestResult .CreateTime ),
254- 			SuiteName :        historyTestResult .Data .SuiteName ,
255- 			SuiteApi :         historyTestResult .Data .SuiteAPI ,
256- 			SuiteParam :       mapToPair (historyTestResult .Data .SuiteParam ),
257- 
258- 			Request : & Request {
259- 				Api :    res .API ,
260- 				Method : res .Method ,
261- 				Body :   res .Body .String (),
262- 				Header : mapToPair (res .Header ),
263- 				Cookie : mapToPair (res .Cookie ),
264- 				Query :  mapInterToPair (res .Query ),
265- 				Form :   mapToPair (res .Form ),
266- 			},
267- 
268- 			Response : & Response {
269- 				StatusCode :       int32 (resp .StatusCode ),
270- 				Body :             resp .Body ,
271- 				Schema :           resp .Schema ,
272- 				Verify :           resp .Verify ,
273- 				BodyFieldsExpect : mapInterToPair (resp .BodyFieldsExpect ),
274- 				Header :           mapToPair (resp .Header ),
275- 			},
276- 		},
248+ 		Data :       convertedHistoryTestCase ,
277249	}
278250
279- 	result .Data .SuiteSpec  =  ToGRPCTestSuiteSpec (historyTestResult .Data .SuiteSpec )
280- 
281251	for  _ , testCaseResult  :=  range  historyTestResult .TestCaseResult  {
282252		result .TestCaseResult  =  append (result .TestCaseResult , & TestCaseResult {
283253			StatusCode : int32 (testCaseResult .StatusCode ),
@@ -288,7 +258,8 @@ func ToGRPCHistoryTestCaseResult(historyTestResult testing.HistoryTestResult) (r
288258			Id :         testCaseResult .Id ,
289259		})
290260	}
291- 	return 
261+ 
262+ 	return  result 
292263}
293264
294265func  ToGRPCTestSuiteSpec (spec  testing.APISpec ) (result  * APISpec ) {
0 commit comments