Skip to content

Commit

Permalink
feat: move jaeger tests to a separate package (#403)
Browse files Browse the repository at this point in the history
* feat: move jaeger tests to a separate package

move jaeger usage to a separate package to let module pruning do
the magic and remove it from the module graph for downstream clients.

* lint: remove unused funcs

* lint: fix linter issues
  • Loading branch information
kruskall authored Dec 4, 2024
1 parent 6037746 commit 1c68dad
Show file tree
Hide file tree
Showing 26 changed files with 721 additions and 680 deletions.
713 changes: 713 additions & 0 deletions input/jaeger/jaeger_test.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions input/otlp/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,14 @@ func transformMetrics(t *testing.T, metrics pmetric.Metrics) ([]*modelpb.APMEven
return *batches[0], consumer.Stats(), result, err
}

func batchRecorderBatchProcessor(out *[]*modelpb.Batch) modelpb.BatchProcessor {
return modelpb.ProcessBatchFunc(func(ctx context.Context, batch *modelpb.Batch) error {
batchCopy := batch.Clone()
*out = append(*out, &batchCopy)
return nil
})
}

// eventsMatch aims to compare the expected and actual APMEvents however, it will
// be indeterministic for more than one samples and more than one APMEvents
func eventsMatch(t *testing.T, expected []*modelpb.APMEvent, actual []*modelpb.APMEvent) {
Expand Down
Loading

0 comments on commit 1c68dad

Please sign in to comment.