Skip to content

Commit

Permalink
Initialize logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Rebhan committed Jul 21, 2021
1 parent 7999790 commit 6f2553d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/inputs/opcua/opcua_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"time"

"github.com/influxdata/telegraf/config"
"github.com/influxdata/telegraf/testutil"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -40,6 +42,7 @@ func TestClient1Integration(t *testing.T) {
o.RequestTimeout = config.Duration(1 * time.Second)
o.SecurityPolicy = "None"
o.SecurityMode = "None"
o.Log = testutil.Logger{}
for _, tags := range testopctags {
o.RootNodes = append(o.RootNodes, MapOPCTag(tags))
}
Expand Down Expand Up @@ -250,6 +253,7 @@ func TestValidateOPCTags(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
o := OpcUA{
nodes: tt.nodes,
Log: testutil.Logger{},
}
require.Equal(t, tt.err, o.validateOPCTags())
})
Expand Down

0 comments on commit 6f2553d

Please sign in to comment.