diff --git a/grpcurl_test.go b/grpcurl_test.go index bc020c2..9542981 100644 --- a/grpcurl_test.go +++ b/grpcurl_test.go @@ -243,12 +243,8 @@ func doTestListMethods(t *testing.T, source DescriptorSource, includeReflection func TestGetAllFiles(t *testing.T) { expectedFiles := []string{"test.proto"} - // server reflection picks up filename from linked in Go package, - // which indicates "grpc_testing/test.proto", not our local copy. - expectedFilesWithReflection := [][]string{ - {"grpc_reflection_v1alpha/reflection.proto", "test.proto"}, - // depending on the version of grpc, the filenames could be prefixed with "interop/" and "reflection/" - {"reflection/grpc_reflection_v1alpha/reflection.proto", "test.proto"}, + expectedFilesWithReflection := []string{ + "grpc/reflection/v1alpha/reflection.proto", "test.proto", } for _, ds := range descSources { @@ -261,17 +257,11 @@ func TestGetAllFiles(t *testing.T) { match := false var expected []string if ds.includeRefl { - for _, expectedNames := range expectedFilesWithReflection { - expected = expectedNames - if reflect.DeepEqual(expected, names) { - match = true - break - } - } + expected = expectedFilesWithReflection } else { expected = expectedFiles - match = reflect.DeepEqual(expected, names) } + match = reflect.DeepEqual(expected, names) if !match { t.Errorf("GetAllFiles returned wrong results: wanted %v, got %v", expected, names) }