From 642b23ab78f3e6ea9404b7df6b33cb31cff910b6 Mon Sep 17 00:00:00 2001 From: Rick <1450685+LinuxSuRen@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:28:00 +0800 Subject: [PATCH] fix: the request method is incorrect via swagger creation (#342) Co-authored-by: rick --- 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 ed40826..167794e 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 1492527..c957f6d 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(),