v2_test.go 408 B

1234567891011121314151617181920
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package tests
  4. import (
  5. "context"
  6. v2 "adm-task/pb/v2"
  7. "testing"
  8. )
  9. func Test_HelloV2(t *testing.T) {
  10. r, err := client.SayHelloV2(context.Background(), &v2.HelloRequest{Name: "world"})
  11. if err == nil {
  12. d, _ := json.Marshal(r)
  13. t.Log(string(d))
  14. } else {
  15. t.Error("failed to call: ", err)
  16. }
  17. }