add tracing and refactor some api pkgs

This commit is contained in:
Livio Amstutz
2020-03-24 14:15:01 +01:00
parent a5ca611dcc
commit 96b88f5d8c
26 changed files with 1198 additions and 12 deletions
@@ -0,0 +1,20 @@
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{})
}