1package lightstep_test 2 3import ( 4 "github.com/lightstep/lightstep-tracer-common/golang/gogo/collectorpb" 5 "github.com/lightstep/lightstep-tracer-common/golang/gogo/collectorpb/collectorpbfakes" 6 . "github.com/lightstep/lightstep-tracer-go" 7) 8 9type cpbfakesFakeClient struct { 10 collectorpbfakes.FakeCollectorServiceClient 11} 12 13func newGrpcFakeClient() fakeCollectorClient { 14 fakeClient := new(collectorpbfakes.FakeCollectorServiceClient) 15 fakeClient.ReportReturns(&collectorpb.ReportResponse{}, nil) 16 return &cpbfakesFakeClient{FakeCollectorServiceClient: *fakeClient} 17} 18 19func (fakeClient *cpbfakesFakeClient) ConnectorFactory() ConnectorFactory { 20 return fakeGrpcConnection(&fakeClient.FakeCollectorServiceClient) 21} 22 23func (fakeClient *cpbfakesFakeClient) getSpans() []*collectorpb.Span { 24 return getReportedGRPCSpans(&fakeClient.FakeCollectorServiceClient) 25} 26 27func (fakeClient *cpbfakesFakeClient) GetSpansLen() int { 28 return len(fakeClient.getSpans()) 29} 30