优化test文件
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
package curlx_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"code.yun.ink/open/curlx"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestCurlx(t *testing.T) {
|
|
||||||
p := curlx.CurlParams{}
|
|
||||||
p.Url = "http://www.baidu.com"
|
|
||||||
p.Method = "GET"
|
|
||||||
|
|
||||||
resp,code,err := curlx.NewCurlx().Send(context.Background(), &p)
|
|
||||||
t.Log(resp,code,err)
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -8,6 +8,16 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestCurlx(t *testing.T) {
|
||||||
|
p := CurlParams{}
|
||||||
|
p.Url = "http://www.baidu.com"
|
||||||
|
p.Method = "GET"
|
||||||
|
|
||||||
|
resp, code, err := NewCurlx().Send(context.Background(), &p)
|
||||||
|
t.Log(resp, code, err)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func TestSendFile(t *testing.T) {
|
func TestSendFile(t *testing.T) {
|
||||||
|
|
||||||
file, err := os.Open("./go.mod")
|
file, err := os.Open("./go.mod")
|
||||||
|
|||||||
Reference in New Issue
Block a user