Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0f6458

Browse files
committed
removed unecessary helpers
1 parentb3fb728 commitf0f6458

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-
funclogCtxWrittenOnce(t*testing.T,logCtx*RequestLoggerContext)bool {
40-
returnlogCtxWrittenField(t,logCtx)
41-
}
42-
43-
funclogCtxWrittenField(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-
returnfalse
48-
}
49-
returntrue
50-
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp