summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/logger/logger_test.go
blob: df7049d0ad6ef449a2d44b2321b15b566a2d90be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
		})
	}
}