Skip to content

Commit

Permalink
Add a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Sep 23, 2024
1 parent cfbf5a7 commit aae4349
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/send_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
berrors "github.com/letsencrypt/boulder/errors"
"github.com/letsencrypt/boulder/identifier"
"github.com/letsencrypt/boulder/log"
"github.com/letsencrypt/boulder/probs"
"github.com/letsencrypt/boulder/test"
)

Expand Down Expand Up @@ -94,3 +95,11 @@ func TestSendErrorSubProbLogging(t *testing.T) {

test.AssertEquals(t, logEvent.Error, `400 :: malformed :: dfoop :: bad ["example.com :: malformed :: dfoop :: nop", "what about example.com :: malformed :: dfoop :: nah"]`)
}

func TestSendErrorPausedProblemLoggingSuppression(t *testing.T) {
rw := httptest.NewRecorder()
logEvent := RequestEvent{}
SendError(log.NewMock(), rw, &logEvent, probs.Paused("I better not see any of this"), nil)

test.AssertEquals(t, logEvent.Error, "429 :: rateLimited :: account/ident pair is paused")
}

0 comments on commit aae4349

Please sign in to comment.