From 5192c9d8cd0e78c04c6aedab12dd3d9b61daf832 Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 23 Jan 2024 03:16:49 +0000 Subject: [PATCH] fix: the request method is incorrect via swagger creation --- console/atest-ui/src/views/TestSuite.vue | 4 +--- pkg/server/convert.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/console/atest-ui/src/views/TestSuite.vue b/console/atest-ui/src/views/TestSuite.vue index ed408265..167794ee 100644 --- a/console/atest-ui/src/views/TestSuite.vue +++ b/console/atest-ui/src/views/TestSuite.vue @@ -173,9 +173,7 @@ const apiSpecKinds = [ ] const handleAPISelect = (item: TestCase) => { - if (testCaseForm.method === '') { - testCaseForm.method = item.request.method - } + testCaseForm.method = item.request.method if (testCaseForm.name === '') { testCaseForm.name = item.name } diff --git a/pkg/server/convert.go b/pkg/server/convert.go index 14925274..c957f6d9 100644 --- a/pkg/server/convert.go +++ b/pkg/server/convert.go @@ -136,7 +136,7 @@ func ToGRPCTestCase(testCase testing.TestCase) (result *TestCase) { req := &Request{ Api: testCase.Request.API, Method: testCase.Request.Method, - // Query: mapToPair(testCase.Request.Query), + Query: mapInterToPair(testCase.Request.Query), Header: mapToPair(testCase.Request.Header), Form: mapToPair(testCase.Request.Form), Body: testCase.Request.Body.String(),