From 7c4f12c79eeb8046fbaad8f6290f4b627dc31e1c Mon Sep 17 00:00:00 2001 From: Rick <1450685+LinuxSuRen@users.noreply.github.com> Date: Sun, 12 Mar 2023 15:08:28 +0800 Subject: [PATCH] remove the unnecessary output (#12) --- Makefile | 2 +- cmd/run.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 33e2f02..d3ea59e 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,6 @@ build: go build -o bin/atest main.go copy: build - cp bin/atest /usr/local/bin/ + sudo cp bin/atest /usr/local/bin/ test: go test ./... diff --git a/cmd/run.go b/cmd/run.go index f455164..9e1b6bd 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -41,7 +41,6 @@ func (o *runOption) runE(cmd *cobra.Command, args []string) (err error) { if files, err = filepath.Glob(o.pattern); err == nil { for i := range files { item := files[i] - fmt.Println(item, "===", o.pattern, args) if err = runSuite(item, ctx); err != nil { return } @@ -60,7 +59,7 @@ func runSuite(suite string, ctx map[string]interface{}) (err error) { for _, testCase := range testSuite.Items { // reuse the API prefix if strings.HasPrefix(testCase.Request.API, "/") { - testCase.Request.API = fmt.Sprintf("%s/%s", testSuite.API, testCase.Request.API) + testCase.Request.API = fmt.Sprintf("%s%s", testSuite.API, testCase.Request.API) } setRelativeDir(suite, &testCase)