diff --git a/internal/gengapic/gengapic_test.go b/internal/gengapic/gengapic_test.go index 00b4700637..a5c3b0d923 100644 --- a/internal/gengapic/gengapic_test.go +++ b/internal/gengapic/gengapic_test.go @@ -1433,9 +1433,9 @@ func TestInsertDynamicRequestHeaders_Ordering(t *testing.T) { inputType := &descriptorpb.DescriptorProto{ Name: proto.String("InputType"), Field: []*descriptorpb.FieldDescriptorProto{ - {Name: proto.String("field1"), Type: typePtr(descriptorpb.FieldDescriptorProto_TYPE_STRING)}, - {Name: proto.String("field2"), Type: typePtr(descriptorpb.FieldDescriptorProto_TYPE_STRING)}, - {Name: proto.String("field3"), Type: typePtr(descriptorpb.FieldDescriptorProto_TYPE_STRING)}, + {Name: proto.String("field1"), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum()}, + {Name: proto.String("field2"), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum()}, + {Name: proto.String("field3"), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum()}, }, } g.descInfo.Type[".InputType"] = inputType @@ -1518,10 +1518,6 @@ func TestInsertDynamicRequestHeaders_Ordering(t *testing.T) { } } -func typePtr(t descriptorpb.FieldDescriptorProto_Type) *descriptorpb.FieldDescriptorProto_Type { - return &t -} - func setHTTPOption(o *descriptorpb.MethodOptions, pattern string) { proto.SetExtension(o, annotations.E_Http, &annotations.HttpRule{ Pattern: &annotations.HttpRule_Get{