Skip to content

Commit

Permalink
fix write expected
Browse files Browse the repository at this point in the history
  • Loading branch information
jcountsNR committed Sep 21, 2023
1 parent 1009d64 commit c5c8c3b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions receiver/kafkametricsreceiver/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/consumer/consumertest"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/scraperinttest"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest"
Expand All @@ -28,9 +27,6 @@ const (
)

func TestIntegration(t *testing.T) {

sink := new(consumertest.MetricsSink)

scraperinttest.NewIntegrationTest(
NewFactory(),
scraperinttest.WithNetworkRequest(
Expand Down Expand Up @@ -98,8 +94,6 @@ func TestIntegration(t *testing.T) {
rCfg.Metrics.MessagingKafkaBrokerRequestsInFlight.Enabled = true
rCfg.Metrics.MessagingKafkaBrokerResponseRate.Enabled = true
rCfg.Metrics.MessagingKafkaBrokerResponseSize.Enabled = true

rCfg.MetricsSink = sink
}),

// scraperinttest.WriteExpected(), // TODO remove
Expand All @@ -108,10 +102,6 @@ func TestIntegration(t *testing.T) {
pmetrictest.IgnoreStartTimestamp(),
pmetrictest.IgnoreTimestamp(),
),
scraperinttest.WriteExpected(),
).Run(t)

collectedMetrics := sink.AllMetrics()

err := scraperinttest.WriteExpected(collectedMetrics, "./testdata/integration/expected.yaml")
require.noError(t, err)
}

0 comments on commit c5c8c3b

Please sign in to comment.