From ea8188256468bdaef77f3a38c2e20366ebf53753 Mon Sep 17 00:00:00 2001 From: violapioggia <2604296771@qq.com> Date: Sat, 17 Feb 2024 18:39:39 +0800 Subject: [PATCH] chore: modify unit_test --- adaptor/handler_test.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/adaptor/handler_test.go b/adaptor/handler_test.go index 5c0ff89..e2e345f 100644 --- a/adaptor/handler_test.go +++ b/adaptor/handler_test.go @@ -43,7 +43,6 @@ package adaptor import ( "context" - "fmt" "io/ioutil" "net/http" "net/url" @@ -478,16 +477,10 @@ func TestFile(t *testing.T) { assert.NotEqual(t, req.Header.Get("Content-Type"), "application/x-www-form-urlencoded") err := req.ParseForm() - if err != nil { - fmt.Println(err) - panic(err) - } + assert.Nil(t, err) file, m, err := req.FormFile("file") - if err != nil { - fmt.Println(err) - panic(err) - } + assert.Nil(t, err) assert.DeepEqual(t, m.Filename, "handler.go")