mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-08 11:58:49 +03:00
Fix errors tests
This commit is contained in:
parent
68c416e414
commit
9467dbdd40
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/middleware"
|
"github.com/mholt/caddy/middleware"
|
||||||
|
@ -109,7 +110,7 @@ func TestErrors(t *testing.T) {
|
||||||
t.Errorf("Test %d: Expected body %q, but got %q",
|
t.Errorf("Test %d: Expected body %q, but got %q",
|
||||||
i, test.expectedBody, body)
|
i, test.expectedBody, body)
|
||||||
}
|
}
|
||||||
if log := buf.String(); log != test.expectedLog {
|
if log := buf.String(); !strings.Contains(log, test.expectedLog) {
|
||||||
t.Errorf("Test %d: Expected log %q, but got %q",
|
t.Errorf("Test %d: Expected log %q, but got %q",
|
||||||
i, test.expectedLog, log)
|
i, test.expectedLog, log)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue