zitadel/internal/tracing/mock/tracing_mock_impl.go

21 lines
417 B
Go
Raw Normal View History

2020-03-24 14:15:01 +01:00
package mock
import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/caos/zitadel/internal/tracing"
)
func NewSimpleMockTracer(t *testing.T) *MockTracer {
return NewMockTracer(gomock.NewController(t))
}
func ExpectServerSpan(ctx context.Context, mock interface{}) {
m := mock.(*MockTracer)
any := gomock.Any()
m.EXPECT().NewServerSpan(any, any).AnyTimes().Return(ctx, &tracing.Span{})
}