@@ -137,7 +137,7 @@ func TestSpeakeasy_Middleware_Capture_Success(t *testing.T) {
137
137
wg := & sync.WaitGroup {}
138
138
wg .Add (1 )
139
139
140
- sdkInstance , err := speakeasy .New (speakeasy.Config {
140
+ sdkInstance := speakeasy .New (speakeasy.Config {
141
141
APIKey : testAPIKey ,
142
142
ApiID : testApiID ,
143
143
VersionID : testVersionID ,
@@ -156,7 +156,6 @@ func TestSpeakeasy_Middleware_Capture_Success(t *testing.T) {
156
156
wg .Done ()
157
157
}),
158
158
})
159
- assert .Nil (t , err )
160
159
161
160
h := sdkInstance .Middleware (http .HandlerFunc (func (w http.ResponseWriter , req * http.Request ) {
162
161
ctrl := speakeasy .MiddlewareController (req )
@@ -241,6 +240,7 @@ func TestSpeakeasy_Middleware_Capture_Success(t *testing.T) {
241
240
w := httptest .NewRecorder ()
242
241
243
242
var req * http.Request
243
+ var err error
244
244
if tt .Args .Body == "" {
245
245
req , err = http .NewRequest (tt .Args .Method , tt .Args .URL , nil )
246
246
} else {
@@ -342,7 +342,7 @@ func TestSpeakeasy_Middleware_URL_Resolve_Success(t *testing.T) {
342
342
wg := & sync.WaitGroup {}
343
343
wg .Add (1 )
344
344
345
- sdkInstance , err := speakeasy .New (speakeasy.Config {
345
+ sdkInstance := speakeasy .New (speakeasy.Config {
346
346
APIKey : testAPIKey ,
347
347
ApiID : testApiID ,
348
348
VersionID : testVersionID ,
@@ -357,7 +357,6 @@ func TestSpeakeasy_Middleware_URL_Resolve_Success(t *testing.T) {
357
357
wg .Done ()
358
358
}),
359
359
})
360
- assert .Nil (t , err )
361
360
362
361
r := mux .NewRouter ()
363
362
r .Use (sdkInstance .Middleware )
@@ -441,7 +440,7 @@ func TestSpeakeasy_Middleware_GorillaMux_PathHint_Success(t *testing.T) {
441
440
wg := & sync.WaitGroup {}
442
441
wg .Add (1 )
443
442
444
- sdkInstance , err := speakeasy .New (speakeasy.Config {
443
+ sdkInstance := speakeasy .New (speakeasy.Config {
445
444
APIKey : testAPIKey ,
446
445
ApiID : testApiID ,
447
446
VersionID : testVersionID ,
@@ -451,7 +450,6 @@ func TestSpeakeasy_Middleware_GorillaMux_PathHint_Success(t *testing.T) {
451
450
wg .Done ()
452
451
}),
453
452
})
454
- assert .Nil (t , err )
455
453
456
454
r := mux .NewRouter ()
457
455
r .Use (sdkInstance .Middleware )
@@ -521,7 +519,7 @@ func TestSpeakeasy_Middleware_Chi_PathHint_Success(t *testing.T) {
521
519
wg := & sync.WaitGroup {}
522
520
wg .Add (1 )
523
521
524
- sdkInstance , err := speakeasy .New (speakeasy.Config {
522
+ sdkInstance := speakeasy .New (speakeasy.Config {
525
523
APIKey : testAPIKey ,
526
524
ApiID : testApiID ,
527
525
VersionID : testVersionID ,
@@ -531,7 +529,6 @@ func TestSpeakeasy_Middleware_Chi_PathHint_Success(t *testing.T) {
531
529
wg .Done ()
532
530
}),
533
531
})
534
- assert .Nil (t , err )
535
532
536
533
r := chi .NewRouter ()
537
534
r .Use (sdkInstance .Middleware )
@@ -587,7 +584,7 @@ func TestSpeakeasy_Middleware_ServerMux_PathHint_Success(t *testing.T) {
587
584
wg := & sync.WaitGroup {}
588
585
wg .Add (1 )
589
586
590
- sdkInstance , err := speakeasy .New (speakeasy.Config {
587
+ sdkInstance := speakeasy .New (speakeasy.Config {
591
588
APIKey : testAPIKey ,
592
589
ApiID : testApiID ,
593
590
VersionID : testVersionID ,
@@ -597,7 +594,6 @@ func TestSpeakeasy_Middleware_ServerMux_PathHint_Success(t *testing.T) {
597
594
wg .Done ()
598
595
}),
599
596
})
600
- assert .Nil (t , err )
601
597
602
598
r := http .DefaultServeMux
603
599
@@ -645,7 +641,7 @@ func TestSpeakeasy_GinMiddleware_Success(t *testing.T) {
645
641
wg := & sync.WaitGroup {}
646
642
wg .Add (1 )
647
643
648
- sdkInstance , err := speakeasy .New (speakeasy.Config {
644
+ sdkInstance := speakeasy .New (speakeasy.Config {
649
645
APIKey : testAPIKey ,
650
646
ApiID : testApiID ,
651
647
VersionID : testVersionID ,
@@ -655,7 +651,6 @@ func TestSpeakeasy_GinMiddleware_Success(t *testing.T) {
655
651
wg .Done ()
656
652
}),
657
653
})
658
- assert .Nil (t , err )
659
654
660
655
r := gin .Default ()
661
656
r .Use (sdkInstance .GinMiddleware )
@@ -743,6 +738,7 @@ func TestSpeakeasy_GinMiddleware_Success(t *testing.T) {
743
738
w := httptest .NewRecorder ()
744
739
745
740
var req * http.Request
741
+ var err error
746
742
if tt .Args .Body == "" {
747
743
req , err = http .NewRequest (tt .Args .Method , tt .Args .URL , nil )
748
744
} else {
@@ -821,7 +817,7 @@ func TestSpeakeasy_GinMiddleware_PathHint_Success(t *testing.T) {
821
817
wg := & sync.WaitGroup {}
822
818
wg .Add (1 )
823
819
824
- sdkInstance , err := speakeasy .New (speakeasy.Config {
820
+ sdkInstance := speakeasy .New (speakeasy.Config {
825
821
APIKey : testAPIKey ,
826
822
ApiID : testApiID ,
827
823
VersionID : testVersionID ,
@@ -831,7 +827,6 @@ func TestSpeakeasy_GinMiddleware_PathHint_Success(t *testing.T) {
831
827
wg .Done ()
832
828
}),
833
829
})
834
- assert .Nil (t , err )
835
830
836
831
r := gin .Default ()
837
832
r .Use (sdkInstance .GinMiddleware )
@@ -886,7 +881,7 @@ func TestSpeakeasy_EchoMiddleware_Success(t *testing.T) {
886
881
wg := & sync.WaitGroup {}
887
882
wg .Add (1 )
888
883
889
- sdkInstance , err := speakeasy .New (speakeasy.Config {
884
+ sdkInstance := speakeasy .New (speakeasy.Config {
890
885
APIKey : testAPIKey ,
891
886
ApiID : testApiID ,
892
887
VersionID : testVersionID ,
@@ -896,7 +891,6 @@ func TestSpeakeasy_EchoMiddleware_Success(t *testing.T) {
896
891
wg .Done ()
897
892
}),
898
893
})
899
- assert .Nil (t , err )
900
894
901
895
r := echo .New ()
902
896
r .Use (sdkInstance .EchoMiddleware )
@@ -986,6 +980,7 @@ func TestSpeakeasy_EchoMiddleware_Success(t *testing.T) {
986
980
w := httptest .NewRecorder ()
987
981
988
982
var req * http.Request
983
+ var err error
989
984
if tt .Args .Body == "" {
990
985
req , err = http .NewRequest (tt .Args .Method , tt .Args .URL , nil )
991
986
} else {
@@ -1064,7 +1059,7 @@ func TestSpeakeasy_EchoMiddleware_PathHint_Success(t *testing.T) {
1064
1059
wg := & sync.WaitGroup {}
1065
1060
wg .Add (1 )
1066
1061
1067
- sdkInstance , err := speakeasy .New (speakeasy.Config {
1062
+ sdkInstance := speakeasy .New (speakeasy.Config {
1068
1063
APIKey : testAPIKey ,
1069
1064
ApiID : testApiID ,
1070
1065
VersionID : testVersionID ,
@@ -1074,7 +1069,6 @@ func TestSpeakeasy_EchoMiddleware_PathHint_Success(t *testing.T) {
1074
1069
wg .Done ()
1075
1070
}),
1076
1071
})
1077
- assert .Nil (t , err )
1078
1072
1079
1073
r := echo .New ()
1080
1074
r .Use (sdkInstance .EchoMiddleware )
@@ -1137,7 +1131,7 @@ func TestSpeakeasy_Middleware_Capture_CustomerID_Success(t *testing.T) {
1137
1131
wg := & sync.WaitGroup {}
1138
1132
wg .Add (1 )
1139
1133
1140
- sdkInstance , err := speakeasy .New (speakeasy.Config {
1134
+ sdkInstance := speakeasy .New (speakeasy.Config {
1141
1135
APIKey : testAPIKey ,
1142
1136
ApiID : testApiID ,
1143
1137
VersionID : testVersionID ,
@@ -1147,7 +1141,6 @@ func TestSpeakeasy_Middleware_Capture_CustomerID_Success(t *testing.T) {
1147
1141
wg .Done ()
1148
1142
}),
1149
1143
})
1150
- assert .Nil (t , err )
1151
1144
1152
1145
w := httptest .NewRecorder ()
1153
1146
0 commit comments