Skip to content

Commit

Permalink
chore: delint
Browse files Browse the repository at this point in the history
  • Loading branch information
johnabass committed Aug 20, 2024
1 parent 00b4753 commit ae6f02c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ linters-settings:

linters:
enable:
- bodyclose
- dupl
- errorlint
# - funlen
- goconst
- gosec
- misspell
Expand Down
8 changes: 4 additions & 4 deletions basculehttp/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (suite *MiddlewareTestSuite) serveHTTPFunc(response http.ResponseWriter, _
// assertNormalResponse asserts that the Middleware allowed the response from serveHTTPFunc.
func (suite *MiddlewareTestSuite) assertNormalResponse(response *httptest.ResponseRecorder) {
suite.Equal(299, response.Code)
suite.Equal("application/octet-stream", response.HeaderMap.Get("Content-Type"))
suite.Equal("application/octet-stream", response.Result().Header.Get("Content-Type"))
suite.Equal("normal response", response.Body.String())
}

Expand Down Expand Up @@ -187,7 +187,7 @@ func (suite *MiddlewareTestSuite) TestCustomErrorRendering() {

h.ServeHTTP(response, request)
suite.Equal(567, response.Code)
suite.Equal("text/xml", response.HeaderMap.Get("Content-Type"))
suite.Equal("text/xml", response.Result().Header.Get("Content-Type"))
suite.Equal("<something/>", response.Body.String())
}

Expand Down Expand Up @@ -225,7 +225,7 @@ func (suite *MiddlewareTestSuite) TestMarshalError() {
h.ServeHTTP(response, request)
suite.Equal(http.StatusInternalServerError, response.Code)

mediaType, _, err := mime.ParseMediaType(response.HeaderMap.Get("Content-Type"))
mediaType, _, err := mime.ParseMediaType(response.Result().Header.Get("Content-Type"))
suite.Require().NoError(err)
suite.Equal("text/plain", mediaType)
suite.Equal(marshalErr.Error(), response.Body.String())
Expand Down Expand Up @@ -320,7 +320,7 @@ func (suite *MiddlewareTestSuite) testBasicAuthChallenge() {

suite.Equal(
`Basic realm="test" charset="UTF-8"`,
response.HeaderMap.Get(WWWAuthenticateHeader),
response.Result().Header.Get(WWWAuthenticateHeader),
)

suite.True(authenticateEvent)
Expand Down

0 comments on commit ae6f02c

Please sign in to comment.