Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmke committed Jan 28, 2024
1 parent c0cb834 commit 150f5a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions service/middleware/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestLogging(t *testing.T) {
log, err := xlog.New(
xlog.AsText(),
xlog.WriteTo(&buf),
xlog.MockClock(time.Unix(1650000000, 0)),
xlog.MockClock(time.Unix(1650000000, 0).UTC()),
)
require.NoError(t, err)

Expand All @@ -36,7 +36,7 @@ func TestLogging(t *testing.T) {
require.Equal(t, http.StatusOK, w.Code)

assert.Equal(t, strings.Join([]string{
"time=2022-04-15T07:20:00.000+02:00",
"time=2022-04-15T05:20:00.000Z",
"level=INFO",
`msg=""`,
"method=GET",
Expand Down
4 changes: 2 additions & 2 deletions service/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func TestHandleStatus_withFailIO(t *testing.T) {
log, err := xlog.New(
xlog.AsText(),
xlog.WriteTo(&buf),
xlog.MockClock(time.Unix(1650000000, 0)),
xlog.MockClock(time.Unix(1650000000, 0).UTC()),
)
require.NoError(t, err)

Expand All @@ -85,7 +85,7 @@ func TestHandleStatus_withFailIO(t *testing.T) {
assert.Equal(t, http.StatusOK, rec.code)
assert.Equal(t, mimeTypeJSON, rec.h.Get("Content-Type"))
assert.Equal(t, strings.Join([]string{
"time=2022-04-15T07:20:00.000+02:00",
"time=2022-04-15T05:20:00.000Z",
"level=ERROR",
`msg="failed to write response"`,
`error="io: read/write on closed pipe"`,
Expand Down

0 comments on commit 150f5a4

Please sign in to comment.