summaryrefslogtreecommitdiffstats
path: root/src/go/logger/logger_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/logger/logger_test.go')
-rw-r--r--src/go/logger/logger_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/go/logger/logger_test.go b/src/go/logger/logger_test.go
new file mode 100644
index 00000000..df7049d0
--- /dev/null
+++ b/src/go/logger/logger_test.go
@@ -0,0 +1,21 @@
+package logger
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestNew(t *testing.T) {
+ tests := map[string]*Logger{
+ "default logger": New(),
+ "nil logger": nil,
+ }
+
+ for name, logger := range tests {
+ t.Run(name, func(t *testing.T) {
+ f := func() { logger.Infof("test %s", "test") }
+ assert.NotPanics(t, f)
+ })
+ }
+}