mirror of
https://github.com/VinGarcia/ksql.git
synced 2025-07-11 13:09:07 +00:00
Add one final test for the logger feature
This commit is contained in:
parent
08247e5b82
commit
5513a0c68d
19
logger_test.go
Normal file
19
logger_test.go
Normal file
@ -0,0 +1,19 @@
|
||||
package ksql
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
tt "github.com/vingarcia/ksql/internal/testtools"
|
||||
)
|
||||
|
||||
func TestCtxLog(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
t.Run("should not log anything nor panic if logger is nil", func(t *testing.T) {
|
||||
panicPayload := tt.PanicHandler(func() {
|
||||
ctxLog(ctx, "fakeQuery", []interface{}{}, nil)
|
||||
})
|
||||
tt.AssertEqual(t, panicPayload, nil)
|
||||
})
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user