gitee.com/sasukebo/go-micro/v4@v4.7.1/api/client/client_test.go (about) 1 package client 2 3 import ( 4 "os" 5 "testing" 6 ) 7 8 func TestBasicCall(t *testing.T) { 9 if v := os.Getenv("IN_TRAVIS_CI"); v == "yes" { 10 return 11 } 12 13 response := map[string]interface{}{} 14 if err := NewClient(&Options{ 15 Token: os.Getenv("TOKEN"), 16 }).Call("groups", "list", map[string]interface{}{ 17 "memberId": "random", 18 }, &response); err != nil { 19 t.Fatal(err) 20 } 21 if len(response) > 0 { 22 t.Fatal(len(response)) 23 } 24 }