File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -27,24 +27,11 @@ func TestRequestLoggerContext_WriteLog(t *testing.T) {
27
27
// Write log for 200 status
28
28
logCtx .WriteLog (ctx , http .StatusOK )
29
29
30
- if ! logCtxWrittenOnce ( t , logCtx ) {
30
+ if ! logCtx . written {
31
31
t .Error ("expected log to be written once" )
32
32
}
33
33
// Attempt to write again (should be skipped).
34
34
// If the error log entry gets written,
35
35
// slogtest will fail the test.
36
36
logCtx .WriteLog (ctx , http .StatusInternalServerError )
37
37
}
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
- }
You can’t perform that action at this time.
0 commit comments