@@ -12,6 +12,8 @@ import (
12
12
"strings"
13
13
"testing"
14
14
15
+ "github.com/stretchr/testify/assert"
16
+
15
17
"gopkg.in/DataDog/dd-trace-go.v1/contrib/gorilla/mux"
16
18
"gopkg.in/DataDog/dd-trace-go.v1/internal/telemetry"
17
19
"gopkg.in/DataDog/dd-trace-go.v1/internal/telemetry/telemetrytest"
@@ -23,14 +25,12 @@ import (
23
25
// sends the correct data to the telemetry client.
24
26
func TestIntegrationInfo (t * testing.T ) {
25
27
// mux.NewRouter() uses the net/http and gorilla/mux integration
26
- client := new (telemetrytest.MockClient )
27
- client .On ("AppStart" ).Return ()
28
- client .On ("MarkIntegrationAsLoaded" , telemetry.Integration {Name : "net/http" , Version : "" , Error : "" }).Return ()
29
- client .On ("MarkIntegrationAsLoaded" , telemetry.Integration {Name : "gorilla/mux" , Version : "" , Error : "" }).Return ()
28
+ client := new (telemetrytest.RecordClient )
30
29
telemetry .StartApp (client )
31
30
_ = mux .NewRouter ()
32
31
33
- client .AssertExpectations (t )
32
+ assert .Contains (t , client .Integrations , telemetry.Integration {Name : "net/http" , Version : "" , Error : "" })
33
+ assert .Contains (t , client .Integrations , telemetry.Integration {Name : "gorilla/mux" , Version : "" , Error : "" })
34
34
}
35
35
36
36
type contribPkg struct {
0 commit comments