Skip to content

Commit

Permalink
modules/log: remove noop written variables (go-gitea#10182)
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine GIRARD <[email protected]>
  • Loading branch information
alrs and sapk authored Feb 7, 2020
1 parent 11789ae commit 0754cec
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions modules/log/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func listenReadAndClose(t *testing.T, l net.Listener, expected string) {
}

func TestConnLogger(t *testing.T) {
var written []byte

protocol := "tcp"
address := ":3099"

Expand Down Expand Up @@ -79,8 +77,6 @@ func TestConnLogger(t *testing.T) {
}()
wg.Wait()

written = written[:0]

event.level = WARN
expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg)
wg.Add(2)
Expand Down Expand Up @@ -156,8 +152,6 @@ func TestConnLoggerFailConnect(t *testing.T) {
}

func TestConnLoggerClose(t *testing.T) {
var written []byte

protocol := "tcp"
address := ":3099"

Expand Down Expand Up @@ -217,8 +211,6 @@ func TestConnLoggerClose(t *testing.T) {
assert.Equal(t, level, connLogger.Level)
assert.Equal(t, level, logger.GetLevel())

written = written[:0]

event.level = WARN
expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg)
wg.Add(2)
Expand Down

0 comments on commit 0754cec

Please sign in to comment.