Documentation ¶
Overview ¶
Package tests are different utilities used for testing DRLM Core
Index ¶
- func GenerateCfg(t *testing.T, ctx *context.Context)
- func GenerateCtx() *context.Context
- func GenerateDB(t *testing.T, ctx *context.Context) sqlmock.Sqlmock
- func GenerateMinio(ctx *context.Context, f http.Handler) *httptest.Server
- type AgentConnectionServerMock
- func (a *AgentConnectionServerMock) Context() context.Context
- func (a *AgentConnectionServerMock) Recv() (*drlm.AgentConnectionFromAgent, error)
- func (a *AgentConnectionServerMock) RecvMsg(m interface{}) error
- func (a *AgentConnectionServerMock) Send(req *drlm.AgentConnectionFromCore) error
- func (a *AgentConnectionServerMock) SendHeader(metadata.MD) error
- func (a *AgentConnectionServerMock) SendMsg(m interface{}) error
- func (a *AgentConnectionServerMock) SetHeader(metadata.MD) error
- func (a *AgentConnectionServerMock) SetTrailer(metadata.MD)
- type DBAnyBucketName
- type DBAnyEncryptedPassword
- type DBAnySecret
- type DBAnyTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCfg ¶
GenerateCfg creates a configuration file with the default values
func GenerateDB ¶
GenerateDB generates a new Mock DB
Types ¶
type AgentConnectionServerMock ¶
AgentConnectionServerMock is a mock for the Agent Connection gRPC server
func (*AgentConnectionServerMock) Context ¶
func (a *AgentConnectionServerMock) Context() context.Context
Context mocks the grpc.ServerStream Context method
func (*AgentConnectionServerMock) Recv ¶
func (a *AgentConnectionServerMock) Recv() (*drlm.AgentConnectionFromAgent, error)
Recv mocks the AgentConnnectionServer Recv method
func (*AgentConnectionServerMock) RecvMsg ¶
func (a *AgentConnectionServerMock) RecvMsg(m interface{}) error
RecvMsg mocks the grpc.ServerStream RecvMsg method
func (*AgentConnectionServerMock) Send ¶
func (a *AgentConnectionServerMock) Send(req *drlm.AgentConnectionFromCore) error
Send mocks the AgentConnectionServer Send method
func (*AgentConnectionServerMock) SendHeader ¶
func (a *AgentConnectionServerMock) SendHeader(metadata.MD) error
SendHeader mocks the grpc.ServerStream SendHeader method
func (*AgentConnectionServerMock) SendMsg ¶
func (a *AgentConnectionServerMock) SendMsg(m interface{}) error
SendMsg mocks the grpc.ServerStream SendMsg method
func (*AgentConnectionServerMock) SetHeader ¶
func (a *AgentConnectionServerMock) SetHeader(metadata.MD) error
SetHeader mocks the grpc.ServerStream SetHeader method
func (*AgentConnectionServerMock) SetTrailer ¶
func (a *AgentConnectionServerMock) SetTrailer(metadata.MD)
SetTrailer mocks the grpc.ServerStream SetTrailer method
type DBAnyBucketName ¶
type DBAnyBucketName struct{}
DBAnyBucketName is used to mock bucket names (since they have a UID part)
type DBAnyEncryptedPassword ¶
type DBAnyEncryptedPassword struct{}
DBAnyEncryptedPassword is used to mock encrypted passwords using bcrypt