Skip to content

Commit

Permalink
test(server): fix server log test
Browse files Browse the repository at this point in the history
  • Loading branch information
cshum committed Sep 1, 2023
1 parent d66b75d commit 08393ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestServer(t *testing.T) {
}

func TestServerErrorLog(t *testing.T) {
expectLogged := []string{"panic", "server", "server", "server"}
expectLogged := []string{"panic", "server", "server"}
var logged []string
logger := zap.NewExample(zap.Hooks(func(entry zapcore.Entry) error {
logged = append(logged, entry.Message)
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestServerErrorLog(t *testing.T) {
ts.Config = &s.Server
defer ts.Close()

w, err := http.Get(ts.URL + "/unsafe/bar.jpg?boom;asdf")
w, err := http.Get(ts.URL + "/unsafe/bar.jpg?boom")
assert.NoError(t, err)
assert.Equal(t, 500, w.StatusCode)
assert.NotEmpty(t, w.Header.Get("Vary"))
Expand Down

0 comments on commit 08393ac

Please sign in to comment.