Skip to content

Commit

Permalink
Add exporter to the test
Browse files Browse the repository at this point in the history
  • Loading branch information
pkcll committed Feb 6, 2025
1 parent f0f83de commit 98714ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/promotel/promotel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ func TestExample(t *testing.T) {
return false
}
foundCh := make(chan struct{})
nextFunc := func(_ context.Context, md pmetric.Metrics) error {
// TODO: add mocked GRPC endpoint for exporter
exporter := startExporter(context.Background(), logger)
nextFunc := func(ctx context.Context, md pmetric.Metrics) error {
if findMetric(testCounterMetricName, md) {
foundCh <- struct{}{}
}
return nil
return exporter.Consumer().ConsumeMetrics(ctx, md)
}
receiver := startMetricReceiver(g, r, logger, nextFunc)

Expand Down

0 comments on commit 98714ad

Please sign in to comment.