github.com/youminxue/odin@v0.0.0-20230216022911-c2c8b05d3a41/cmd/client_test.go (about) 1 package cmd_test 2 3 import ( 4 "github.com/youminxue/odin/cmd" 5 "os" 6 "testing" 7 ) 8 9 func TestClientCmd(t *testing.T) { 10 defer os.RemoveAll("client") 11 // go-doudou svc http client --file testdata/testsvc/testsvc_openapi3.json 12 _, _, err := ExecuteCommandC(cmd.GetRootCmd(), []string{"svc", "http", "client", "--file", "testdata/testsvc/testsvc_openapi3.json"}...) 13 if err != nil { 14 t.Error(err) 15 return 16 } 17 }