Skip to content

Commit

Permalink
[chore] update test to be compatible with confmap changes to unmarsha…
Browse files Browse the repository at this point in the history
…l via confmap first
  • Loading branch information
atoulme committed Apr 24, 2024
1 parent 816b1f9 commit 7443ffe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions exporter/datadogexporter/config_warnings_test.go
Expand Up @@ -7,7 +7,6 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap"
)

Expand Down Expand Up @@ -80,7 +79,7 @@ func TestSendAggregations(t *testing.T) {
t.Run(testInstance.name, func(t *testing.T) {
f := NewFactory()
cfg := f.CreateDefaultConfig().(*Config)
err := component.UnmarshalConfig(testInstance.cfgMap, cfg)
err := testInstance.cfgMap.Unmarshal(cfg)
if err != nil || testInstance.err != "" {
assert.EqualError(t, err, testInstance.err)
} else {
Expand Down Expand Up @@ -157,7 +156,7 @@ func TestPeerTags(t *testing.T) {
t.Run(testInstance.name, func(t *testing.T) {
f := NewFactory()
cfg := f.CreateDefaultConfig().(*Config)
err := component.UnmarshalConfig(testInstance.cfgMap, cfg)
err := testInstance.cfgMap.Unmarshal(cfg)
if err != nil || testInstance.err != "" {
assert.EqualError(t, err, testInstance.err)
} else {
Expand Down

0 comments on commit 7443ffe

Please sign in to comment.