Skip to content

Commit

Permalink
fix: broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SkArchon committed Jan 30, 2025
1 parent c60d629 commit b0e8ed0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions router/core/access_log_field_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestAccessLogsFieldHandler(t *testing.T) {
make([]config.CustomAttribute, 0),
make([]requestlogger.ExpressionAttribute, 0),
nil,
nil,
req,
nil,
)
Expand Down Expand Up @@ -60,6 +61,7 @@ func TestAccessLogsFieldHandler(t *testing.T) {
make([]config.CustomAttribute, 0),
exprAttributes,
nil,
nil,
req,
nil,
)
Expand All @@ -84,7 +86,7 @@ func TestAccessLogsFieldHandler(t *testing.T) {
ExternalErrors: nil,
},
}
rcc.expressionContext.Request.Error = requestError
rcc.error = requestError

req = req.WithContext(withRequestContext(req.Context(), rcc))

Expand All @@ -105,13 +107,14 @@ func TestAccessLogsFieldHandler(t *testing.T) {
make([]config.CustomAttribute, 0),
exprAttributes,
nil,
nil,
req,
nil,
)

expressionResponse := response[1]
require.Equal(t, expressionResponseKey, expressionResponse.Key)
require.Equal(t, requestError, expressionResponse.Interface)
require.Equal(t, &ExprWrapError{requestError}, expressionResponse.Interface)
})

}

0 comments on commit b0e8ed0

Please sign in to comment.