Skip to content

Commit

Permalink
Revert "test(inputs.consul): Run Init method in tests"
Browse files Browse the repository at this point in the history
This reverts commit 4862198.
  • Loading branch information
Hipska committed Sep 17, 2024
1 parent eaa5a0a commit c7ebb58
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions plugins/inputs/consul/consul_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"testing"

"github.com/hashicorp/consul/api"
"github.com/stretchr/testify/require"

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

Expand Down Expand Up @@ -45,7 +43,6 @@ func TestGatherHealthCheck(t *testing.T) {
var acc testutil.Accumulator

consul := &Consul{}
require.NoError(t, consul.Init())
consul.GatherHealthCheck(&acc, sampleChecks)

acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags)
Expand Down Expand Up @@ -75,7 +72,6 @@ func TestGatherHealthCheckWithDelimitedTags(t *testing.T) {
consul := &Consul{
TagDelimiter: ":",
}
require.NoError(t, consul.Init())
consul.GatherHealthCheck(&acc, sampleChecks)

acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags)
Expand Down Expand Up @@ -105,7 +101,6 @@ func TestGatherHealthCheckV2(t *testing.T) {
consul := &Consul{
MetricVersion: 2,
}
require.NoError(t, consul.Init())
consul.GatherHealthCheck(&acc, sampleChecks)

acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags)
Expand Down Expand Up @@ -136,7 +131,6 @@ func TestGatherHealthCheckWithDelimitedTagsV2(t *testing.T) {
MetricVersion: 2,
TagDelimiter: ":",
}
require.NoError(t, consul.Init())
consul.GatherHealthCheck(&acc, sampleChecks)

acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags)
Expand Down

0 comments on commit c7ebb58

Please sign in to comment.