mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
reusing variables to retry travis due to failure of coveralls from a travis bug
This commit is contained in:
13
echo_test.go
13
echo_test.go
@ -44,16 +44,21 @@ func TestEcho(t *testing.T) {
|
|||||||
|
|
||||||
func TestLogger(t *testing.T) {
|
func TestLogger(t *testing.T) {
|
||||||
prefix := "extremely-long-prefix-string-that-wont-exist"
|
prefix := "extremely-long-prefix-string-that-wont-exist"
|
||||||
|
logmsg := "test-log-message"
|
||||||
|
|
||||||
e := New()
|
e := New()
|
||||||
|
|
||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
out := bufio.NewWriter(&b)
|
writer := bufio.NewWriter(&b)
|
||||||
|
|
||||||
e.logger.SetPrefix(prefix)
|
e.logger.SetPrefix(prefix)
|
||||||
e.logger.SetOutput(out)
|
e.logger.SetOutput(writer)
|
||||||
e.logger.Print("test")
|
e.logger.Print(logmsg)
|
||||||
|
|
||||||
assert.Contains(t, "extremely-long-prefix-string", b.String())
|
output := b.String()
|
||||||
|
|
||||||
|
assert.Contains(t, prefix, output)
|
||||||
|
assert.Contains(t, logmsg, output)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEchoIndex(t *testing.T) {
|
func TestEchoIndex(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user