@@ -137,7 +137,7 @@ func TestSpeakeasy_Middleware_Capture_Success(t *testing.T) {
137137 wg := & sync.WaitGroup {}
138138 wg .Add (1 )
139139
140- sdkInstance := speakeasy .New (speakeasy.Config {
140+ sdkInstance , err := speakeasy .New (speakeasy.Config {
141141 APIKey : testAPIKey ,
142142 ApiID : testApiID ,
143143 VersionID : testVersionID ,
@@ -156,6 +156,7 @@ func TestSpeakeasy_Middleware_Capture_Success(t *testing.T) {
156156 wg .Done ()
157157 }),
158158 })
159+ assert .Nil (t , err )
159160
160161 h := sdkInstance .Middleware (http .HandlerFunc (func (w http.ResponseWriter , req * http.Request ) {
161162 ctrl := speakeasy .MiddlewareController (req )
@@ -240,7 +241,6 @@ func TestSpeakeasy_Middleware_Capture_Success(t *testing.T) {
240241 w := httptest .NewRecorder ()
241242
242243 var req * http.Request
243- var err error
244244 if tt .Args .Body == "" {
245245 req , err = http .NewRequest (tt .Args .Method , tt .Args .URL , nil )
246246 } else {
@@ -342,7 +342,7 @@ func TestSpeakeasy_Middleware_URL_Resolve_Success(t *testing.T) {
342342 wg := & sync.WaitGroup {}
343343 wg .Add (1 )
344344
345- sdkInstance := speakeasy .New (speakeasy.Config {
345+ sdkInstance , err := speakeasy .New (speakeasy.Config {
346346 APIKey : testAPIKey ,
347347 ApiID : testApiID ,
348348 VersionID : testVersionID ,
@@ -357,6 +357,7 @@ func TestSpeakeasy_Middleware_URL_Resolve_Success(t *testing.T) {
357357 wg .Done ()
358358 }),
359359 })
360+ assert .Nil (t , err )
360361
361362 r := mux .NewRouter ()
362363 r .Use (sdkInstance .Middleware )
@@ -440,7 +441,7 @@ func TestSpeakeasy_Middleware_GorillaMux_PathHint_Success(t *testing.T) {
440441 wg := & sync.WaitGroup {}
441442 wg .Add (1 )
442443
443- sdkInstance := speakeasy .New (speakeasy.Config {
444+ sdkInstance , err := speakeasy .New (speakeasy.Config {
444445 APIKey : testAPIKey ,
445446 ApiID : testApiID ,
446447 VersionID : testVersionID ,
@@ -450,6 +451,7 @@ func TestSpeakeasy_Middleware_GorillaMux_PathHint_Success(t *testing.T) {
450451 wg .Done ()
451452 }),
452453 })
454+ assert .Nil (t , err )
453455
454456 r := mux .NewRouter ()
455457 r .Use (sdkInstance .Middleware )
@@ -519,7 +521,7 @@ func TestSpeakeasy_Middleware_Chi_PathHint_Success(t *testing.T) {
519521 wg := & sync.WaitGroup {}
520522 wg .Add (1 )
521523
522- sdkInstance := speakeasy .New (speakeasy.Config {
524+ sdkInstance , err := speakeasy .New (speakeasy.Config {
523525 APIKey : testAPIKey ,
524526 ApiID : testApiID ,
525527 VersionID : testVersionID ,
@@ -529,6 +531,7 @@ func TestSpeakeasy_Middleware_Chi_PathHint_Success(t *testing.T) {
529531 wg .Done ()
530532 }),
531533 })
534+ assert .Nil (t , err )
532535
533536 r := chi .NewRouter ()
534537 r .Use (sdkInstance .Middleware )
@@ -584,7 +587,7 @@ func TestSpeakeasy_Middleware_ServerMux_PathHint_Success(t *testing.T) {
584587 wg := & sync.WaitGroup {}
585588 wg .Add (1 )
586589
587- sdkInstance := speakeasy .New (speakeasy.Config {
590+ sdkInstance , err := speakeasy .New (speakeasy.Config {
588591 APIKey : testAPIKey ,
589592 ApiID : testApiID ,
590593 VersionID : testVersionID ,
@@ -594,6 +597,7 @@ func TestSpeakeasy_Middleware_ServerMux_PathHint_Success(t *testing.T) {
594597 wg .Done ()
595598 }),
596599 })
600+ assert .Nil (t , err )
597601
598602 r := http .DefaultServeMux
599603
@@ -641,7 +645,7 @@ func TestSpeakeasy_GinMiddleware_Success(t *testing.T) {
641645 wg := & sync.WaitGroup {}
642646 wg .Add (1 )
643647
644- sdkInstance := speakeasy .New (speakeasy.Config {
648+ sdkInstance , err := speakeasy .New (speakeasy.Config {
645649 APIKey : testAPIKey ,
646650 ApiID : testApiID ,
647651 VersionID : testVersionID ,
@@ -651,6 +655,7 @@ func TestSpeakeasy_GinMiddleware_Success(t *testing.T) {
651655 wg .Done ()
652656 }),
653657 })
658+ assert .Nil (t , err )
654659
655660 r := gin .Default ()
656661 r .Use (sdkInstance .GinMiddleware )
@@ -738,7 +743,6 @@ func TestSpeakeasy_GinMiddleware_Success(t *testing.T) {
738743 w := httptest .NewRecorder ()
739744
740745 var req * http.Request
741- var err error
742746 if tt .Args .Body == "" {
743747 req , err = http .NewRequest (tt .Args .Method , tt .Args .URL , nil )
744748 } else {
@@ -817,7 +821,7 @@ func TestSpeakeasy_GinMiddleware_PathHint_Success(t *testing.T) {
817821 wg := & sync.WaitGroup {}
818822 wg .Add (1 )
819823
820- sdkInstance := speakeasy .New (speakeasy.Config {
824+ sdkInstance , err := speakeasy .New (speakeasy.Config {
821825 APIKey : testAPIKey ,
822826 ApiID : testApiID ,
823827 VersionID : testVersionID ,
@@ -827,6 +831,7 @@ func TestSpeakeasy_GinMiddleware_PathHint_Success(t *testing.T) {
827831 wg .Done ()
828832 }),
829833 })
834+ assert .Nil (t , err )
830835
831836 r := gin .Default ()
832837 r .Use (sdkInstance .GinMiddleware )
@@ -881,7 +886,7 @@ func TestSpeakeasy_EchoMiddleware_Success(t *testing.T) {
881886 wg := & sync.WaitGroup {}
882887 wg .Add (1 )
883888
884- sdkInstance := speakeasy .New (speakeasy.Config {
889+ sdkInstance , err := speakeasy .New (speakeasy.Config {
885890 APIKey : testAPIKey ,
886891 ApiID : testApiID ,
887892 VersionID : testVersionID ,
@@ -891,6 +896,7 @@ func TestSpeakeasy_EchoMiddleware_Success(t *testing.T) {
891896 wg .Done ()
892897 }),
893898 })
899+ assert .Nil (t , err )
894900
895901 r := echo .New ()
896902 r .Use (sdkInstance .EchoMiddleware )
@@ -980,7 +986,6 @@ func TestSpeakeasy_EchoMiddleware_Success(t *testing.T) {
980986 w := httptest .NewRecorder ()
981987
982988 var req * http.Request
983- var err error
984989 if tt .Args .Body == "" {
985990 req , err = http .NewRequest (tt .Args .Method , tt .Args .URL , nil )
986991 } else {
@@ -1059,7 +1064,7 @@ func TestSpeakeasy_EchoMiddleware_PathHint_Success(t *testing.T) {
10591064 wg := & sync.WaitGroup {}
10601065 wg .Add (1 )
10611066
1062- sdkInstance := speakeasy .New (speakeasy.Config {
1067+ sdkInstance , err := speakeasy .New (speakeasy.Config {
10631068 APIKey : testAPIKey ,
10641069 ApiID : testApiID ,
10651070 VersionID : testVersionID ,
@@ -1069,6 +1074,7 @@ func TestSpeakeasy_EchoMiddleware_PathHint_Success(t *testing.T) {
10691074 wg .Done ()
10701075 }),
10711076 })
1077+ assert .Nil (t , err )
10721078
10731079 r := echo .New ()
10741080 r .Use (sdkInstance .EchoMiddleware )
@@ -1131,7 +1137,7 @@ func TestSpeakeasy_Middleware_Capture_CustomerID_Success(t *testing.T) {
11311137 wg := & sync.WaitGroup {}
11321138 wg .Add (1 )
11331139
1134- sdkInstance := speakeasy .New (speakeasy.Config {
1140+ sdkInstance , err := speakeasy .New (speakeasy.Config {
11351141 APIKey : testAPIKey ,
11361142 ApiID : testApiID ,
11371143 VersionID : testVersionID ,
@@ -1141,6 +1147,7 @@ func TestSpeakeasy_Middleware_Capture_CustomerID_Success(t *testing.T) {
11411147 wg .Done ()
11421148 }),
11431149 })
1150+ assert .Nil (t , err )
11441151
11451152 w := httptest .NewRecorder ()
11461153
0 commit comments