Skip to content

Commit b3c691e

Browse files
committed
removed unecessary helpers
1 parent 3605cf4 commit b3c691e

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

coderd/httpmw/logger_test.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,11 @@ func TestRequestLoggerContext_WriteLog(t *testing.T) {
2727
// Write log for 200 status
2828
logCtx.WriteLog(ctx, http.StatusOK)
2929

30-
if !logCtxWrittenOnce(t, logCtx) {
30+
if !logCtx.written {
3131
t.Error("expected log to be written once")
3232
}
3333
// Attempt to write again (should be skipped).
3434
// If the error log entry gets written,
3535
// slogtest will fail the test.
3636
logCtx.WriteLog(ctx, http.StatusInternalServerError)
3737
}
38-
39-
func logCtxWrittenOnce(t *testing.T, logCtx *RequestLoggerContext) bool {
40-
return logCtxWrittenField(t, logCtx)
41-
}
42-
43-
func logCtxWrittenField(t *testing.T, logCtx *RequestLoggerContext) bool {
44-
logCtxWritten := logCtx != nil && logCtx.written
45-
if !logCtxWritten {
46-
t.Error("log was not marked as written")
47-
return false
48-
}
49-
return true
50-
}

0 commit comments

Comments
 (0)