@ -1,5 +1,5 @@
/ *
/ *
Copyright 2022 CAcert Inc .
Copyright CAcert Inc .
SPDX - License - Identifier : Apache - 2.0
SPDX - License - Identifier : Apache - 2.0
Licensed under the Apache License , Version 2.0 ( the "License" ) ;
Licensed under the Apache License , Version 2.0 ( the "License" ) ;
@ -62,7 +62,7 @@ func Test_secureHeaders(t *testing.T) {
SecureHeaders ( next ) . ServeHTTP ( rr , r )
SecureHeaders ( next ) . ServeHTTP ( rr , r )
rs := rr . Result ( ) //nolint:bodyclose // linters bug
rs := rr . Result ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
@ -119,7 +119,7 @@ func TestApplication_tryAuthenticate(t *testing.T) {
mw . TryAuthenticate ( next ) . ServeHTTP ( rr , r )
mw . TryAuthenticate ( next ) . ServeHTTP ( rr , r )
rs := rr . Result ( ) //nolint:bodyclose // linters bug
rs := rr . Result ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
@ -137,7 +137,7 @@ func TestApplication_tryAuthenticate(t *testing.T) {
mw . TryAuthenticate ( next ) . ServeHTTP ( rr , r )
mw . TryAuthenticate ( next ) . ServeHTTP ( rr , r )
rs := rr . Result ( ) //nolint:bodyclose // linters bug
rs := rr . Result ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
@ -158,11 +158,12 @@ func TestApplication_tryAuthenticate(t *testing.T) {
mw . TryAuthenticate ( next ) . ServeHTTP ( rr , r )
mw . TryAuthenticate ( next ) . ServeHTTP ( rr , r )
rs := rr . Result ( ) //nolint:bodyclose // linters bug
rs := rr . Result ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
defer func ( ) { _ = rs . Body . Close ( ) } ( )
assert . Equal ( t , http . StatusOK , rs . StatusCode )
assert . Equal ( t , http . StatusOK , rs . StatusCode )
user := nextCtx . Value ( ctxUser )
user := nextCtx . Value ( ctxUser )
assert . NotNil ( t , user )
assert . NotNil ( t , user )