@@ -99,14 +99,14 @@ func TestCodecError(t *testing.T) {
9999 if err != nil {
100100 t .Fatal (err )
101101 }
102- if err := Generate (t .Context (), model , outDir , errorConfig ); err == nil {
102+ if err := Generate (t .Context (), model , outDir , errorConfig . General . SpecificationFormat , errorConfig . Codec ); err == nil {
103103 t .Errorf ("expected an error with invalid Codec options" )
104104 }
105105
106- if err := GenerateStorage (t .Context (), outDir , model , errorConfig , model , goodConfig ); err == nil {
106+ if err := GenerateStorage (t .Context (), outDir , model , errorConfig . General . SpecificationFormat , errorConfig . Codec , model , goodConfig . General . SpecificationFormat , goodConfig . Codec ); err == nil {
107107 t .Errorf ("expected an error with invalid Codec options for storage" )
108108 }
109- if err := GenerateStorage (t .Context (), outDir , model , goodConfig , model , errorConfig ); err == nil {
109+ if err := GenerateStorage (t .Context (), outDir , model , goodConfig . General . SpecificationFormat , goodConfig . Codec , model , errorConfig . General . SpecificationFormat , errorConfig . Codec ); err == nil {
110110 t .Errorf ("expected an error with invalid Codec options for control" )
111111 }
112112}
@@ -126,7 +126,7 @@ func TestRustFromOpenAPI(t *testing.T) {
126126 if err != nil {
127127 t .Fatal (err )
128128 }
129- if err := Generate (t .Context (), model , outDir , cfg ); err != nil {
129+ if err := Generate (t .Context (), model , outDir , cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
130130 t .Fatal (err )
131131 }
132132 for _ , expected := range expectedInCrate {
@@ -159,7 +159,7 @@ func TestRustFromDiscovery(t *testing.T) {
159159 if err != nil {
160160 t .Fatal (err )
161161 }
162- if err := Generate (t .Context (), model , outDir , cfg ); err != nil {
162+ if err := Generate (t .Context (), model , outDir , cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
163163 t .Fatal (err )
164164 }
165165 for _ , expected := range expectedInCrate {
@@ -194,7 +194,7 @@ func TestRustFromProtobuf(t *testing.T) {
194194 if err != nil {
195195 t .Fatal (err )
196196 }
197- if err := Generate (t .Context (), model , outDir , cfg ); err != nil {
197+ if err := Generate (t .Context (), model , outDir , cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
198198 t .Fatal (err )
199199 }
200200 for _ , expected := range expectedInCrate {
@@ -233,7 +233,7 @@ func TestRustClient(t *testing.T) {
233233 if err != nil {
234234 t .Fatal (err )
235235 }
236- if err := Generate (t .Context (), model , outDir , cfg ); err != nil {
236+ if err := Generate (t .Context (), model , outDir , cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
237237 t .Fatal (err )
238238 }
239239 for _ , expected := range expectedInClient {
@@ -278,7 +278,7 @@ func TestRustNosvc(t *testing.T) {
278278 if err != nil {
279279 t .Fatal (err )
280280 }
281- if err := Generate (t .Context (), model , outDir , cfg ); err != nil {
281+ if err := Generate (t .Context (), model , outDir , cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
282282 t .Fatal (err )
283283 }
284284 for _ , expected := range expectedInNosvc {
@@ -316,7 +316,7 @@ func TestRustModuleRpc(t *testing.T) {
316316 if err != nil {
317317 t .Fatal (err )
318318 }
319- if err := Generate (t .Context (), model , path .Join (outDir , "rpc" ), cfg ); err != nil {
319+ if err := Generate (t .Context (), model , path .Join (outDir , "rpc" ), cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
320320 t .Fatal (err )
321321 }
322322
@@ -356,7 +356,7 @@ func TestRustBootstrapWkt(t *testing.T) {
356356 if err != nil {
357357 t .Fatal (err )
358358 }
359- if err := Generate (t .Context (), model , path .Join (outDir , "wkt" ), cfg ); err != nil {
359+ if err := Generate (t .Context (), model , path .Join (outDir , "wkt" ), cfg . General . SpecificationFormat , cfg . Codec ); err != nil {
360360 t .Fatal (err )
361361 }
362362
0 commit comments