update tests to expect fully-qualified method names
This commit is contained in:
parent
16bda24c11
commit
d2fe9f683f
|
|
@ -201,12 +201,12 @@ func doTestListMethods(t *testing.T, source DescriptorSource, includeReflection
|
||||||
t.Fatalf("failed to list methods for TestService: %v", err)
|
t.Fatalf("failed to list methods for TestService: %v", err)
|
||||||
}
|
}
|
||||||
expected := []string{
|
expected := []string{
|
||||||
"EmptyCall",
|
"grpc.testing.TestService.EmptyCall",
|
||||||
"FullDuplexCall",
|
"grpc.testing.TestService.FullDuplexCall",
|
||||||
"HalfDuplexCall",
|
"grpc.testing.TestService.HalfDuplexCall",
|
||||||
"StreamingInputCall",
|
"grpc.testing.TestService.StreamingInputCall",
|
||||||
"StreamingOutputCall",
|
"grpc.testing.TestService.StreamingOutputCall",
|
||||||
"UnaryCall",
|
"grpc.testing.TestService.UnaryCall",
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(expected, names) {
|
if !reflect.DeepEqual(expected, names) {
|
||||||
t.Errorf("ListMethods returned wrong results: wanted %v, got %v", expected, names)
|
t.Errorf("ListMethods returned wrong results: wanted %v, got %v", expected, names)
|
||||||
|
|
@ -218,7 +218,7 @@ func doTestListMethods(t *testing.T, source DescriptorSource, includeReflection
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to list methods for ServerReflection: %v", err)
|
t.Fatalf("failed to list methods for ServerReflection: %v", err)
|
||||||
}
|
}
|
||||||
expected = []string{"ServerReflectionInfo"}
|
expected = []string{"grpc.reflection.v1alpha.ServerReflection.ServerReflectionInfo"}
|
||||||
} else {
|
} else {
|
||||||
// without reflection, we see all services defined in the same test.proto file, which is the
|
// without reflection, we see all services defined in the same test.proto file, which is the
|
||||||
// TestService as well as UnimplementedService
|
// TestService as well as UnimplementedService
|
||||||
|
|
@ -226,7 +226,7 @@ func doTestListMethods(t *testing.T, source DescriptorSource, includeReflection
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to list methods for ServerReflection: %v", err)
|
t.Fatalf("failed to list methods for ServerReflection: %v", err)
|
||||||
}
|
}
|
||||||
expected = []string{"UnimplementedCall"}
|
expected = []string{"grpc.testing.UnimplementedService.UnimplementedCall"}
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(expected, names) {
|
if !reflect.DeepEqual(expected, names) {
|
||||||
t.Errorf("ListMethods returned wrong results: wanted %v, got %v", expected, names)
|
t.Errorf("ListMethods returned wrong results: wanted %v, got %v", expected, names)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue