@@ -62,11 +62,11 @@ func TestRetryAfter(t *testing.T) {
6262 },
6363 }),
6464 )
65- res , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
65+ _ , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
6666 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
6767 })
68- if err == nil || res != nil {
69- t .Error ("Expected there to be a cancel error and for the response to be nil " )
68+ if err == nil {
69+ t .Error ("Expected there to be a cancel error" )
7070 }
7171
7272 attempts := len (retryCountHeaders )
@@ -98,11 +98,11 @@ func TestDeleteRetryCountHeader(t *testing.T) {
9898 }),
9999 option .WithHeaderDel ("X-Stainless-Retry-Count" ),
100100 )
101- res , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
101+ _ , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
102102 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
103103 })
104- if err == nil || res != nil {
105- t .Error ("Expected there to be a cancel error and for the response to be nil " )
104+ if err == nil {
105+ t .Error ("Expected there to be a cancel error" )
106106 }
107107
108108 expectedRetryCountHeaders := []string {"" , "" , "" }
@@ -129,11 +129,11 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
129129 }),
130130 option .WithHeader ("X-Stainless-Retry-Count" , "42" ),
131131 )
132- res , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
132+ _ , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
133133 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
134134 })
135- if err == nil || res != nil {
136- t .Error ("Expected there to be a cancel error and for the response to be nil " )
135+ if err == nil {
136+ t .Error ("Expected there to be a cancel error" )
137137 }
138138
139139 expectedRetryCountHeaders := []string {"42" , "42" , "42" }
@@ -159,11 +159,11 @@ func TestRetryAfterMs(t *testing.T) {
159159 },
160160 }),
161161 )
162- res , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
162+ _ , err := client .Runners .New (context .Background (), gitpod.RunnerNewParams {
163163 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
164164 })
165- if err == nil || res != nil {
166- t .Error ("Expected there to be a cancel error and for the response to be nil " )
165+ if err == nil {
166+ t .Error ("Expected there to be a cancel error" )
167167 }
168168 if want := 3 ; attempts != want {
169169 t .Errorf ("Expected %d attempts, got %d" , want , attempts )
@@ -183,11 +183,11 @@ func TestContextCancel(t *testing.T) {
183183 )
184184 cancelCtx , cancel := context .WithCancel (context .Background ())
185185 cancel ()
186- res , err := client .Runners .New (cancelCtx , gitpod.RunnerNewParams {
186+ _ , err := client .Runners .New (cancelCtx , gitpod.RunnerNewParams {
187187 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
188188 })
189- if err == nil || res != nil {
190- t .Error ("Expected there to be a cancel error and for the response to be nil " )
189+ if err == nil {
190+ t .Error ("Expected there to be a cancel error" )
191191 }
192192}
193193
@@ -204,11 +204,11 @@ func TestContextCancelDelay(t *testing.T) {
204204 )
205205 cancelCtx , cancel := context .WithTimeout (context .Background (), 2 * time .Millisecond )
206206 defer cancel ()
207- res , err := client .Runners .New (cancelCtx , gitpod.RunnerNewParams {
207+ _ , err := client .Runners .New (cancelCtx , gitpod.RunnerNewParams {
208208 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
209209 })
210- if err == nil || res != nil {
211- t .Error ("expected there to be a cancel error and for the response to be nil " )
210+ if err == nil {
211+ t .Error ("expected there to be a cancel error" )
212212 }
213213}
214214
@@ -231,11 +231,11 @@ func TestContextDeadline(t *testing.T) {
231231 },
232232 }),
233233 )
234- res , err := client .Runners .New (deadlineCtx , gitpod.RunnerNewParams {
234+ _ , err := client .Runners .New (deadlineCtx , gitpod.RunnerNewParams {
235235 ConnectProtocolVersion : gitpod .F (gitpod .RunnerNewParamsConnectProtocolVersion1 ),
236236 })
237- if err == nil || res != nil {
238- t .Error ("expected there to be a deadline error and for the response to be nil " )
237+ if err == nil {
238+ t .Error ("expected there to be a deadline error" )
239239 }
240240 close (testDone )
241241 }()
0 commit comments