Skip to content

Commit 150f5a4

Browse files
committed
fix tests
1 parent c0cb834 commit 150f5a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

service/middleware/logging_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestLogging(t *testing.T) {
2727
log, err := xlog.New(
2828
xlog.AsText(),
2929
xlog.WriteTo(&buf),
30-
xlog.MockClock(time.Unix(1650000000, 0)),
30+
xlog.MockClock(time.Unix(1650000000, 0).UTC()),
3131
)
3232
require.NoError(t, err)
3333

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

3838
assert.Equal(t, strings.Join([]string{
39-
"time=2022-04-15T07:20:00.000+02:00",
39+
"time=2022-04-15T05:20:00.000Z",
4040
"level=INFO",
4141
`msg=""`,
4242
"method=GET",

service/status_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func TestHandleStatus_withFailIO(t *testing.T) {
6363
log, err := xlog.New(
6464
xlog.AsText(),
6565
xlog.WriteTo(&buf),
66-
xlog.MockClock(time.Unix(1650000000, 0)),
66+
xlog.MockClock(time.Unix(1650000000, 0).UTC()),
6767
)
6868
require.NoError(t, err)
6969

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

0 commit comments

Comments
 (0)