1
0
mirror of https://github.com/zitadel/zitadel.git synced 2024-12-15 04:18:01 +00:00
zitadel/internal/api/grpc/server/middleware/mock_test.go
Florian Forster fa9f581d56
chore(v2): move to new org ()
* chore: move to new org

* logging

* fix: org rename caos -> zitadel

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
2022-04-26 23:01:45 +00:00

27 lines
507 B
Go

package middleware
import (
"context"
"google.golang.org/grpc"
"github.com/zitadel/zitadel/internal/errors"
)
func emptyMockHandler(_ context.Context, req interface{}) (interface{}, error) {
return req, nil
}
func errorMockHandler(_ context.Context, req interface{}) (interface{}, error) {
return nil, errors.ThrowInternal(nil, "test", "error")
}
type mockReq struct{}
func mockInfo(path string) *grpc.UnaryServerInfo {
return &grpc.UnaryServerInfo{
Server: nil,
FullMethod: path,
}
}