diff --git a/internal/librarian/php/generate_test.go b/internal/librarian/php/generate_test.go index 1522dcef5f2..04b9744a344 100644 --- a/internal/librarian/php/generate_test.go +++ b/internal/librarian/php/generate_test.go @@ -114,7 +114,7 @@ func TestGatherProtos(t *testing.T) { } func TestGapicOpts(t *testing.T) { - tests := []struct { + for _, test := range []struct { name string api *config.API apiMetadata *serviceconfig.API @@ -143,7 +143,8 @@ func TestGapicOpts(t *testing.T) { }, grpcConfigPath: "grpc_config.json", want: []string{ - "metadata", "transport=grpc+rest", "migration-mode=NEW_SURFACE_ONLY", "rest-numeric-enums", "generate-snippets", + "metadata", "transport=grpc+rest", "migration-mode=NEW_SURFACE_ONLY", + "rest-numeric-enums", "generate-snippets", "grpc_service_config=grpc_config.json", "service_yaml=service.yaml", }, @@ -154,7 +155,8 @@ func TestGapicOpts(t *testing.T) { apiMetadata: &serviceconfig.API{ SkipRESTNumericEnums: []string{"php"}, }, - want: []string{"metadata", "transport=grpc+rest", "migration-mode=NEW_SURFACE_ONLY", "generate-snippets"}, + want: []string{"metadata", "transport=grpc+rest", "migration-mode=NEW_SURFACE_ONLY", + "generate-snippets"}, }, { name: "custom transport", @@ -164,10 +166,10 @@ func TestGapicOpts(t *testing.T) { "php": serviceconfig.Transport("rest"), }, }, - want: []string{"metadata", "transport=rest", "migration-mode=NEW_SURFACE_ONLY", "rest-numeric-enums", "generate-snippets"}, + want: []string{"metadata", "transport=rest", "migration-mode=NEW_SURFACE_ONLY", + "rest-numeric-enums", "generate-snippets"}, }, - } - for _, test := range tests { + } { t.Run(test.name, func(t *testing.T) { got := gapicOpts(test.api, test.apiMetadata, test.grpcConfigPath) if diff := cmp.Diff(test.want, got); diff != "" {