File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,11 @@ func TestExtractProvisionerDaemonAuthenticated(t *testing.T) {
177
177
httpmw .ExtractProvisionerDaemonAuthenticated (httpmw.ExtractProvisionerAuthConfig {
178
178
DB : db ,
179
179
Optional : false ,
180
- })(http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
180
+ })(http .HandlerFunc (func (w http.ResponseWriter , _ * http.Request ) {
181
181
w .WriteHeader (http .StatusOK )
182
182
})).ServeHTTP (res , r )
183
183
184
+ //nolint:bodyclose
184
185
require .Equal (t , http .StatusOK , res .Result ().StatusCode )
185
186
})
186
187
@@ -212,10 +213,11 @@ func TestExtractProvisionerDaemonAuthenticated(t *testing.T) {
212
213
httpmw .ExtractProvisionerDaemonAuthenticated (httpmw.ExtractProvisionerAuthConfig {
213
214
DB : db ,
214
215
Optional : false ,
215
- })(http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
216
+ })(http .HandlerFunc (func (w http.ResponseWriter , _ * http.Request ) {
216
217
w .WriteHeader (http .StatusOK )
217
218
})).ServeHTTP (res , r )
218
219
220
+ //nolint:bodyclose
219
221
require .Equal (t , http .StatusUnauthorized , res .Result ().StatusCode )
220
222
require .Contains (t , res .Body .String (), "provisioner daemon key invalid" )
221
223
})
You can’t perform that action at this time.
0 commit comments