enable tests
Some checks failed
lint / lint (pull_request) Successful in 53s
pr / test (pull_request) Failing after 1m4s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-10-14 19:01:35 +03:00
parent da45c89e4e
commit a94b4285f9

View File

@ -120,21 +120,20 @@ func TestLogger(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
l.Trace(ctx, "trace_msg1") l.Trace(ctx, "trace_msg1")
// l.Warn(ctx, "warn_msg1") l.Warn(ctx, "warn_msg1")
// l.Fields("error", "test").Info(ctx, "error message") l.Fields("error", "test").Info(ctx, "error message")
// l.Warn(ctx, "first second") l.Warn(ctx, "first second")
if !bytes.Contains(buf.Bytes(), []byte(`"level":"trace","msg":"trace_msg1"`)) { if !bytes.Contains(buf.Bytes(), []byte(`"level":"trace","msg":"trace_msg1"`)) {
t.Fatalf("logger tracer, buf %s", buf.Bytes()) t.Fatalf("logger tracer, buf %s", buf.Bytes())
} }
/*
if !bytes.Contains(buf.Bytes(), []byte(`"warn","msg":"warn_msg1"`)) { if !bytes.Contains(buf.Bytes(), []byte(`"level":"warn","msg":"warn_msg1"`)) {
t.Fatalf("logger warn, buf %s", buf.Bytes()) t.Fatalf("logger warn, buf %s", buf.Bytes())
} }
if !bytes.Contains(buf.Bytes(), []byte(`"error":"test","level":"info","msg":"error message"`)) { if !bytes.Contains(buf.Bytes(), []byte(`"level":"info","msg":"error message","error":"test"`)) {
t.Fatalf("logger info, buf %s", buf.Bytes()) t.Fatalf("logger info, buf %s", buf.Bytes())
} }
if !bytes.Contains(buf.Bytes(), []byte(`"level":"warn","msg":"first second"`)) { if !bytes.Contains(buf.Bytes(), []byte(`"level":"warn","msg":"first second"`)) {
t.Fatalf("logger warn, buf %s", buf.Bytes()) t.Fatalf("logger warn, buf %s", buf.Bytes())
} }
*/
} }