Skip to content

Commit

Permalink
[chore] Migrate aerospike receiver to new integration test framework (#…
Browse files Browse the repository at this point in the history
…22141)

* [chore]Migrate aerospike integration test to new framework
  • Loading branch information
djaglowski authored May 22, 2023
1 parent 30b770d commit d1bda68
Show file tree
Hide file tree
Showing 3 changed files with 209 additions and 187 deletions.
7 changes: 0 additions & 7 deletions internal/coreinternal/scraperinttest/scraperint.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ import (

const errExposedPort = "exposed container port should not be hardcoded to host port. Use ContainerInfo.MappedPort() instead"

func EqualsLatestMetrics(expected pmetric.Metrics, sink *consumertest.MetricsSink, compareOpts []pmetrictest.CompareMetricsOption) func() bool {
return func() bool {
allMetrics := sink.AllMetrics()
return len(allMetrics) > 0 && nil == pmetrictest.CompareMetrics(expected, allMetrics[len(allMetrics)-1], compareOpts...)
}
}

func NewIntegrationTest(f receiver.Factory, opts ...TestOption) *IntegrationTest {
it := &IntegrationTest{
factory: f,
Expand Down
2 changes: 1 addition & 1 deletion receiver/aerospikereceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.19

require (
github.com/aerospike/aerospike-client-go/v6 v6.12.0
github.com/docker/go-connections v0.4.0
github.com/google/go-cmp v0.5.9
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.77.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.77.0
Expand All @@ -29,7 +30,6 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v23.0.6+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand Down
Loading

0 comments on commit d1bda68

Please sign in to comment.