Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: grpc/discovery/internal/testservices/discovery_test.go

Issue 2219023003: Update APIs to use new Google cloud paths. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: grpc/discovery/internal/testservices/discovery_test.go
diff --git a/grpc/discovery/internal/testservices/discovery_test.go b/grpc/discovery/internal/testservices/discovery_test.go
index 50746808e3657fd7a2326e7831dd05a8ee76b769..f7cdd2dc5e3cdd6b05c1089a46c69d49bb7e6156 100644
--- a/grpc/discovery/internal/testservices/discovery_test.go
+++ b/grpc/discovery/internal/testservices/discovery_test.go
@@ -16,9 +16,11 @@ import (
"golang.org/x/net/context"
- "github.com/luci/luci-go/common/proto/google/descriptor"
+ "github.com/luci/luci-go/common/proto/google/descutil"
"github.com/luci/luci-go/grpc/discovery"
+ "google.golang.org/genproto/protobuf"
+
. "github.com/smartystreets/goconvey/convey"
)
@@ -50,22 +52,22 @@ func TestDiscovery(t *testing.T) {
// this checks that file deduplication actually works.
So(len(desc.File), ShouldEqual, 3)
- _, discoveryIndex := desc.FindService("discovery.Discovery")
+ _, discoveryIndex := descutil.FindService(desc, "discovery.Discovery")
So(discoveryIndex, ShouldNotEqual, -1)
- _, calcIndex := desc.FindService("testservices.Calc")
+ _, calcIndex := descutil.FindService(desc, "testservices.Calc")
So(calcIndex, ShouldNotEqual, -1)
- file, greeterIndex := desc.FindService("testservices.Greeter")
+ file, greeterIndex := descutil.FindService(desc, "testservices.Greeter")
So(greeterIndex, ShouldNotEqual, -1)
greeter := file.Service[greeterIndex]
- sayHelloIndex := greeter.FindMethod("SayHello")
+ sayHelloIndex := descutil.FindMethodForService(greeter, "SayHello")
So(sayHelloIndex, ShouldNotEqual, -1)
sayHello := greeter.Method[sayHelloIndex]
So(sayHello.GetInputType(), ShouldEqual, ".testservices.HelloRequest")
- _, obj, _ := desc.Resolve("testservices.HelloRequest")
+ _, obj, _ := descutil.Resolve(desc, "testservices.HelloRequest")
So(obj, ShouldNotBeNil)
helloReq := obj.(*descriptor.DescriptorProto)
So(helloReq, ShouldNotBeNil)

Powered by Google App Engine
This is Rietveld 408576698