@@ -73,12 +73,15 @@ func TestRepoMetadata_write(t *testing.T) {
7373func TestDeriveRepoMetadata_Overrides (t * testing.T ) {
7474 t .Parallel ()
7575 apiPath := "google/cloud/secretmanager/v1"
76- googleapis := "internal /testdata/googleapis"
76+ googleapis := "../.. /testdata/googleapis"
7777
7878 cfg := sample .Config ()
7979 cfg .Language = config .LanguageJava
8080 cfg .Repo = "googleapis/google-cloud-java"
8181 s := sample .RepoMetadata ()
82+ wantNamePretty := "Secret Manager"
83+ wantProductDoc := "https://cloud.google.com/secret-manager/"
84+ wantAPIDescription := "Stores sensitive data such as API keys, passwords, and certificates.\n Provides convenience while improving security."
8285 for _ , test := range []struct {
8386 name string
8487 java * config.JavaModule
@@ -121,20 +124,45 @@ func TestDeriveRepoMetadata_Overrides(t *testing.T) {
121124 APIShortnameOverride : "custom-shortname" ,
122125 },
123126 want : & repoMetadata {
124- APIShortname : "custom-shortname" ,
125- ClientDocumentation : "https://cloud.google.com/java/docs/reference/google-cloud-secretmanager/latest/overview" ,
126- ReleaseLevel : "stable" ,
127- Transport : "both" ,
128- Language : "java" ,
129- Repo : "googleapis/google-cloud-java" ,
130- RepoShort : "java-secretmanager" ,
131- DistributionName : "com.google.cloud:google-cloud-secretmanager" ,
127+ APIShortname : "custom-shortname" ,
128+ NamePretty : wantNamePretty ,
129+ ProductDocumentation : wantProductDoc ,
130+ APIDescription : wantAPIDescription ,
131+ ClientDocumentation : "https://cloud.google.com/java/docs/reference/google-cloud-secretmanager/latest/overview" ,
132+ ReleaseLevel : "stable" ,
133+ Transport : "both" ,
134+ Language : "java" ,
135+ Repo : "googleapis/google-cloud-java" ,
136+ RepoShort : "java-secretmanager" ,
137+ DistributionName : "com.google.cloud:google-cloud-secretmanager" ,
132138 // API ID is also override.
133139 APIID : "custom-shortname.googleapis.com" ,
134140 LibraryType : "GAPIC_AUTO" ,
135141 RequiresBilling : true ,
136142 },
137143 },
144+ {
145+ name : "transport override" ,
146+ java : & config.JavaModule {
147+ TransportOverride : "rest" ,
148+ },
149+ want : & repoMetadata {
150+ APIShortname : "secretmanager" ,
151+ NamePretty : wantNamePretty ,
152+ ProductDocumentation : wantProductDoc ,
153+ APIDescription : wantAPIDescription ,
154+ ClientDocumentation : "https://cloud.google.com/java/docs/reference/google-cloud-secretmanager/latest/overview" ,
155+ ReleaseLevel : "stable" ,
156+ Transport : "rest" ,
157+ Language : "java" ,
158+ Repo : "googleapis/google-cloud-java" ,
159+ RepoShort : "java-secretmanager" ,
160+ DistributionName : "com.google.cloud:google-cloud-secretmanager" ,
161+ APIID : "secretmanager.googleapis.com" ,
162+ LibraryType : "GAPIC_AUTO" ,
163+ RequiresBilling : true ,
164+ },
165+ },
138166 } {
139167 t .Run (test .name , func (t * testing.T ) {
140168 library := & config.Library {
0 commit comments