Documentation
¶
Index ¶
- func AssertCallDelegationTokenEqual(t TestingT, expected, actual *rms.CallDelegationToken, ...) bool
- func AssertNotJumpToStep(t *testing.T, j *journal.Journal, stepName string)
- func AssertVCallRequestEqual(t TestingT, expected, actual *rms.VCallRequest, msgAndArgs ...interface{}) bool
- func AssertVStateReport_ProvidedContentBodyEqual(t TestingT, expected, actual *rms.VStateReport_ProvidedContentBody, ...) bool
- func AssertVStateReportsEqual(t TestingT, expected, actual *rms.VStateReport, msgAndArgs ...interface{}) bool
- func GenerateVCallRequestMethod(server *Server) *rms.VCallRequest
- func GenerateVCallRequestMethodImmutable(server *Server) *rms.VCallRequest
- func InterceptLog(logger log.Logger, interceptFn LogInterceptHandler) log.Logger
- func MakeMinimumValidVStateResult(server *Server, returnArgs []byte) *rms.VCallResult
- type ConveyorCycleFunc
- type LogInterceptHandler
- type RequestWrapper
- type Server
- func NewServer(ctx context.Context, t Tester) (*Server, context.Context)
- func NewServerWithErrorFilter(ctx context.Context, t Tester, errorFilterFn logcommon.ErrorFilterFunc) (*Server, context.Context)
- func NewUninitializedServer(ctx context.Context, t Tester) (*Server, context.Context)
- func NewUninitializedServerWithErrorFilter(ctx context.Context, t Tester, errorFilterFn logcommon.ErrorFilterFunc) (*Server, context.Context)
- func (s *Server) AddInput(ctx context.Context, msg interface{}) error
- func (s *Server) BuildRandomOutgoingWithGivenPulse(pn pulse.Number) reference.Global
- func (s *Server) BuildRandomOutgoingWithPrevPulse() reference.Global
- func (s *Server) BuildRandomOutgoingWithPulse() reference.Global
- func (s *Server) CallAPIAddAmount(ctx context.Context, wallet reference.Global, amount uint) (int, []byte)
- func (s *Server) CallAPICreateWallet(ctx context.Context) (int, []byte)
- func (s *Server) CallAPIDelete(ctx context.Context, wallet reference.Global) (int, []byte)
- func (s *Server) CallAPIGetBalance(ctx context.Context, wallet reference.Global) (int, []byte)
- func (s *Server) CallAPITransfer(ctx context.Context, walletFrom reference.Global, walletTo reference.Global, ...) (int, []byte)
- func (s *Server) DelegationToken(outgoing reference.Global, to reference.Global, object reference.Global) rms.CallDelegationToken
- func (s *Server) GetPrevPulse() beat.Beat
- func (s *Server) GetPrevPulseNumber() pulse.Number
- func (s *Server) GetPulse() beat.Beat
- func (s *Server) GetPulseNumber() pulse.Number
- func (s *Server) GetPulseTime() time.Duration
- func (s *Server) GlobalCaller() reference.Global
- func (s *Server) IncrementPulse(context.Context)
- func (s *Server) IncrementPulseAndWaitIdle(ctx context.Context)
- func (s *Server) Init(ctx context.Context)
- func (s *Server) OverrideConveyorFactoryLogContext(ctx context.Context)
- func (s *Server) RandomGlobalWithPrevPulse() reference.Global
- func (s *Server) RandomGlobalWithPulse() reference.Global
- func (s *Server) RandomLocalWithPrevPulse() reference.Local
- func (s *Server) RandomLocalWithPulse() reference.Local
- func (s *Server) RandomRecordOf(obj reference.Global) reference.Global
- func (s *Server) RandomRecordOfWithGivenPulse(obj reference.Global, pn pulse.Number) reference.Global
- func (s *Server) ReplaceAuthenticationService(svc authentication.Service)
- func (s *Server) ReplaceCache(cache descriptor.Cache)
- func (s *Server) ReplaceMachinesManager(manager machine.Manager)
- func (s *Server) ReplaceRunner(svc runner.Service)
- func (s *Server) ResetActiveConveyorFlag()
- func (s *Server) ResumeConveyor()
- func (s *Server) SendMessage(_ context.Context, msg *message.Message)
- func (s *Server) SendMsg(msg beat.Message)
- func (s *Server) SendPayload(ctx context.Context, pl rmsreg.GoGoSerializable)
- func (s *Server) SendPayloadAsFuture(ctx context.Context, pl rmsreg.GoGoSerializable)
- func (s *Server) SetMaxParallelism(count int)
- func (s *Server) StartRecording()
- func (s *Server) StartRecordingExt(limit int, discardOnOverflow bool)
- func (s *Server) StateReportBuilder() *StateReportBuilder
- func (s *Server) Stop()
- func (s *Server) SuspendConveyorAndWait()
- func (s *Server) SuspendConveyorAndWaitThenResetActive()
- func (s *Server) SuspendConveyorNoWait()
- func (s *Server) WaitActiveThenIdleConveyor()
- func (s *Server) WaitIdleConveyor()
- func (s *Server) WrapPayload(pl rmsreg.GoGoSerializable) *RequestWrapper
- func (s *Server) WrapPayloadAsFuture(pl rmsreg.GoGoSerializable) *RequestWrapper
- type ServerOpts
- type StateReportBuilder
- func (b *StateReportBuilder) Class(class reference.Global) *StateReportBuilder
- func (b *StateReportBuilder) DirtyInactive() *StateReportBuilder
- func (b *StateReportBuilder) DirtyMemory(mem []byte) *StateReportBuilder
- func (b *StateReportBuilder) Empty() *StateReportBuilder
- func (b *StateReportBuilder) Inactive() *StateReportBuilder
- func (b *StateReportBuilder) Memory(mem []byte) *StateReportBuilder
- func (b *StateReportBuilder) Missing() *StateReportBuilder
- func (b *StateReportBuilder) NoValidated() *StateReportBuilder
- func (b *StateReportBuilder) Object(object reference.Global) *StateReportBuilder
- func (b *StateReportBuilder) OrderedPendings(num int) *StateReportBuilder
- func (b *StateReportBuilder) PendingsPulse(pn pulse.Number) *StateReportBuilder
- func (b *StateReportBuilder) Pulse(pn pulse.Number) *StateReportBuilder
- func (b *StateReportBuilder) Ready() *StateReportBuilder
- func (b *StateReportBuilder) Report() rms.VStateReport
- func (b *StateReportBuilder) ReportPtr() *rms.VStateReport
- func (b *StateReportBuilder) StateRef(ref reference.Global) *StateReportBuilder
- func (b *StateReportBuilder) UnorderedPendings(num int) *StateReportBuilder
- func (b *StateReportBuilder) ValidatedMemory(mem []byte) *StateReportBuilder
- type Suite
- type TestCase
- func (c *TestCase) ResetTestRailID()
- func (c *TestCase) Run(t *testing.T, fn func(t *testing.T))
- func (c *TestCase) SetParallel(parallel bool)
- func (c *TestCase) WithErrorFilter(fn func(string) bool) *TestCase
- func (c *TestCase) WithSkipped(skipped string) *TestCase
- func (c *TestCase) WithTestRailID(id string) *TestCase
- type TestRunner
- type Tester
- type TestingT
- type VCallRequestConstructorHandler
- func (h VCallRequestConstructorHandler) Get() rms.VCallRequest
- func (h VCallRequestConstructorHandler) GetIncoming() reference.Global
- func (h VCallRequestConstructorHandler) GetObject() reference.Global
- func (h VCallRequestConstructorHandler) GetOutgoing() reference.Global
- func (h *VCallRequestConstructorHandler) SetArguments(args []byte)
- func (h *VCallRequestConstructorHandler) SetCallFlags(flags rms.CallFlags)
- func (h *VCallRequestConstructorHandler) SetCallFlagsFromMethodIsolation(mi contract.MethodIsolation)
- func (h *VCallRequestConstructorHandler) SetCallOutgoing(callOutgoing reference.Global)
- func (h *VCallRequestConstructorHandler) SetCallSequence(sequence uint32)
- func (h *VCallRequestConstructorHandler) SetCaller(ref reference.Global)
- func (h *VCallRequestConstructorHandler) SetClass(ref reference.Global)
- func (h *VCallRequestConstructorHandler) SetMethod(method string)
- type WalletAddAmountRequestBody
- type WalletAddAmountResponse
- type WalletCreateResponse
- type WalletDeleteRequestBody
- type WalletDeleteResponse
- type WalletGetBalanceRequestBody
- type WalletGetBalanceResponse
- type WalletTransferRequestBody
- type WalletTransferResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertCallDelegationTokenEqual ¶
func AssertCallDelegationTokenEqual(t TestingT, expected, actual *rms.CallDelegationToken, msgAndArgs ...interface{}) bool
func AssertNotJumpToStep ¶
func AssertVCallRequestEqual ¶
func AssertVCallRequestEqual(t TestingT, expected, actual *rms.VCallRequest, msgAndArgs ...interface{}) bool
func AssertVStateReport_ProvidedContentBodyEqual ¶
func AssertVStateReport_ProvidedContentBodyEqual(t TestingT, expected, actual *rms.VStateReport_ProvidedContentBody, msgAndArgs ...interface{}) bool
func AssertVStateReportsEqual ¶
func AssertVStateReportsEqual(t TestingT, expected, actual *rms.VStateReport, msgAndArgs ...interface{}) bool
func GenerateVCallRequestMethod ¶
func GenerateVCallRequestMethod(server *Server) *rms.VCallRequest
GenerateVCallRequestMethod returns CallTypeMethod VCallRequest for tolerable/dirty request by default
func GenerateVCallRequestMethodImmutable ¶
func GenerateVCallRequestMethodImmutable(server *Server) *rms.VCallRequest
func InterceptLog ¶
func InterceptLog(logger log.Logger, interceptFn LogInterceptHandler) log.Logger
func MakeMinimumValidVStateResult ¶
func MakeMinimumValidVStateResult(server *Server, returnArgs []byte) *rms.VCallResult
Types ¶
type ConveyorCycleFunc ¶
type ConveyorCycleFunc func(c *conveyor.PulseConveyor, hasActive, isIdle bool)
type LogInterceptHandler ¶
type LogInterceptHandler = func(interface{})
type RequestWrapper ¶
type RequestWrapper struct {
// contains filtered or unexported fields
}
func NewRequestWrapper ¶
func NewRequestWrapper(pulseNumber pulse.Number, payload rmsreg.GoGoSerializable) *RequestWrapper
func (*RequestWrapper) Finalize ¶
func (w *RequestWrapper) Finalize() *message.Message
func (*RequestWrapper) SetReceiver ¶
func (w *RequestWrapper) SetReceiver(receiver reference.Global) *RequestWrapper
func (*RequestWrapper) SetSender ¶
func (w *RequestWrapper) SetSender(sender reference.Global) *RequestWrapper
type Server ¶
type Server struct { Runner *runner.DefaultService // testing components and Mocks PublisherMock *publisher.Mock JetCoordinatorMock *affinity.HelperMock Journal *journal.Journal // contains filtered or unexported fields }
func NewUninitializedServer ¶
func (*Server) BuildRandomOutgoingWithGivenPulse ¶
func (*Server) BuildRandomOutgoingWithPrevPulse ¶
func (*Server) BuildRandomOutgoingWithPulse ¶
func (*Server) CallAPIAddAmount ¶
func (s *Server) CallAPIAddAmount(ctx context.Context, wallet reference.Global, amount uint) (int, []byte)
nolint:interfacer
func (*Server) CallAPICreateWallet ¶
Utility function RE wallet + HTTP API
func (*Server) CallAPIDelete ¶
nolint:interfacer
func (*Server) CallAPIGetBalance ¶
nolint:interfacer
func (*Server) CallAPITransfer ¶
func (s *Server) CallAPITransfer(ctx context.Context, walletFrom reference.Global, walletTo reference.Global, amount uint) (int, []byte)
nolint:interfacer
func (*Server) DelegationToken ¶
func (*Server) GetPrevPulse ¶
func (*Server) GetPrevPulseNumber ¶
func (*Server) GetPulseNumber ¶
func (*Server) GetPulseTime ¶
func (*Server) GlobalCaller ¶
func (*Server) IncrementPulse ¶
func (*Server) IncrementPulseAndWaitIdle ¶
func (*Server) OverrideConveyorFactoryLogContext ¶
func (*Server) RandomGlobalWithPrevPulse ¶
func (*Server) RandomGlobalWithPulse ¶
func (*Server) RandomLocalWithPrevPulse ¶
func (*Server) RandomLocalWithPulse ¶
func (*Server) RandomRecordOf ¶
func (*Server) RandomRecordOfWithGivenPulse ¶
func (*Server) ReplaceAuthenticationService ¶
func (s *Server) ReplaceAuthenticationService(svc authentication.Service)
func (*Server) ReplaceCache ¶
func (s *Server) ReplaceCache(cache descriptor.Cache)
func (*Server) ReplaceMachinesManager ¶
func (*Server) ReplaceRunner ¶
func (*Server) ResetActiveConveyorFlag ¶
func (s *Server) ResetActiveConveyorFlag()
func (*Server) ResumeConveyor ¶
func (s *Server) ResumeConveyor()
func (*Server) SendMessage ¶
deprecated // use SendMsg
func (*Server) SendPayload ¶
func (s *Server) SendPayload(ctx context.Context, pl rmsreg.GoGoSerializable)
func (*Server) SendPayloadAsFuture ¶
func (s *Server) SendPayloadAsFuture(ctx context.Context, pl rmsreg.GoGoSerializable)
func (*Server) SetMaxParallelism ¶
Set limit for parallel runners. Function must be called before server.Init If this limit does not set it will be set by default (NumCPU() - 2)
func (*Server) StartRecording ¶
func (s *Server) StartRecording()
func (*Server) StartRecordingExt ¶
func (*Server) StateReportBuilder ¶
func (s *Server) StateReportBuilder() *StateReportBuilder
func (*Server) SuspendConveyorAndWait ¶
func (s *Server) SuspendConveyorAndWait()
func (*Server) SuspendConveyorAndWaitThenResetActive ¶
func (s *Server) SuspendConveyorAndWaitThenResetActive()
func (*Server) SuspendConveyorNoWait ¶
func (s *Server) SuspendConveyorNoWait()
func (*Server) WaitActiveThenIdleConveyor ¶
func (s *Server) WaitActiveThenIdleConveyor()
func (*Server) WaitIdleConveyor ¶
func (s *Server) WaitIdleConveyor()
func (*Server) WrapPayload ¶
func (s *Server) WrapPayload(pl rmsreg.GoGoSerializable) *RequestWrapper
func (*Server) WrapPayloadAsFuture ¶
func (s *Server) WrapPayloadAsFuture(pl rmsreg.GoGoSerializable) *RequestWrapper
type ServerOpts ¶
type ServerOpts struct { ErrorFilter logcommon.ErrorFilterFunc Initialization bool Delta uint16 }
func NewDefaultServerOpts ¶
func NewDefaultServerOpts() ServerOpts
type StateReportBuilder ¶
type StateReportBuilder struct {
// contains filtered or unexported fields
}
func NewStateReportBuilder ¶
func NewStateReportBuilder() *StateReportBuilder
func (*StateReportBuilder) Class ¶
func (b *StateReportBuilder) Class(class reference.Global) *StateReportBuilder
func (*StateReportBuilder) DirtyInactive ¶
func (b *StateReportBuilder) DirtyInactive() *StateReportBuilder
func (*StateReportBuilder) DirtyMemory ¶
func (b *StateReportBuilder) DirtyMemory(mem []byte) *StateReportBuilder
func (*StateReportBuilder) Empty ¶
func (b *StateReportBuilder) Empty() *StateReportBuilder
func (*StateReportBuilder) Inactive ¶
func (b *StateReportBuilder) Inactive() *StateReportBuilder
func (*StateReportBuilder) Memory ¶
func (b *StateReportBuilder) Memory(mem []byte) *StateReportBuilder
func (*StateReportBuilder) Missing ¶
func (b *StateReportBuilder) Missing() *StateReportBuilder
func (*StateReportBuilder) NoValidated ¶
func (b *StateReportBuilder) NoValidated() *StateReportBuilder
func (*StateReportBuilder) Object ¶
func (b *StateReportBuilder) Object(object reference.Global) *StateReportBuilder
func (*StateReportBuilder) OrderedPendings ¶
func (b *StateReportBuilder) OrderedPendings(num int) *StateReportBuilder
func (*StateReportBuilder) PendingsPulse ¶
func (b *StateReportBuilder) PendingsPulse(pn pulse.Number) *StateReportBuilder
func (*StateReportBuilder) Pulse ¶
func (b *StateReportBuilder) Pulse(pn pulse.Number) *StateReportBuilder
func (*StateReportBuilder) Ready ¶
func (b *StateReportBuilder) Ready() *StateReportBuilder
func (*StateReportBuilder) Report ¶
func (b *StateReportBuilder) Report() rms.VStateReport
func (*StateReportBuilder) ReportPtr ¶
func (b *StateReportBuilder) ReportPtr() *rms.VStateReport
func (*StateReportBuilder) StateRef ¶
func (b *StateReportBuilder) StateRef(ref reference.Global) *StateReportBuilder
func (*StateReportBuilder) UnorderedPendings ¶
func (b *StateReportBuilder) UnorderedPendings(num int) *StateReportBuilder
func (*StateReportBuilder) ValidatedMemory ¶
func (b *StateReportBuilder) ValidatedMemory(mem []byte) *StateReportBuilder
type Suite ¶
type Suite struct { Skipped string Parallel bool TestRailID string Cases []TestRunner }
type TestCase ¶
type TestCase struct { Name string TestRailID string Skipped string Minimock *minimock.Controller Server *Server Context context.Context Runner *logicless.ServiceMock TypedChecker *checker.Typed // contains filtered or unexported fields }
func NewSkippedTestCase ¶
func NewTestCase ¶
func (*TestCase) ResetTestRailID ¶
func (c *TestCase) ResetTestRailID()
func (*TestCase) SetParallel ¶
func (*TestCase) WithErrorFilter ¶
func (*TestCase) WithSkipped ¶
func (*TestCase) WithTestRailID ¶
type TestRunner ¶
type VCallRequestConstructorHandler ¶
type VCallRequestConstructorHandler struct {
// contains filtered or unexported fields
}
func GenerateVCallRequestConstructor ¶
func GenerateVCallRequestConstructor(server *Server) VCallRequestConstructorHandler
func GenerateVCallRequestConstructorForPulse ¶
func GenerateVCallRequestConstructorForPulse(server *Server, pn pulse.Number) VCallRequestConstructorHandler
func (VCallRequestConstructorHandler) Get ¶
func (h VCallRequestConstructorHandler) Get() rms.VCallRequest
func (VCallRequestConstructorHandler) GetIncoming ¶
func (h VCallRequestConstructorHandler) GetIncoming() reference.Global
func (VCallRequestConstructorHandler) GetObject ¶
func (h VCallRequestConstructorHandler) GetObject() reference.Global
func (VCallRequestConstructorHandler) GetOutgoing ¶
func (h VCallRequestConstructorHandler) GetOutgoing() reference.Global
func (*VCallRequestConstructorHandler) SetArguments ¶
func (h *VCallRequestConstructorHandler) SetArguments(args []byte)
func (*VCallRequestConstructorHandler) SetCallFlags ¶
func (h *VCallRequestConstructorHandler) SetCallFlags(flags rms.CallFlags)
func (*VCallRequestConstructorHandler) SetCallFlagsFromMethodIsolation ¶
func (h *VCallRequestConstructorHandler) SetCallFlagsFromMethodIsolation(mi contract.MethodIsolation)
func (*VCallRequestConstructorHandler) SetCallOutgoing ¶
func (h *VCallRequestConstructorHandler) SetCallOutgoing(callOutgoing reference.Global)
deprecated
func (*VCallRequestConstructorHandler) SetCallSequence ¶
func (h *VCallRequestConstructorHandler) SetCallSequence(sequence uint32)
func (*VCallRequestConstructorHandler) SetCaller ¶
func (h *VCallRequestConstructorHandler) SetCaller(ref reference.Global)
func (*VCallRequestConstructorHandler) SetClass ¶
func (h *VCallRequestConstructorHandler) SetClass(ref reference.Global)
func (*VCallRequestConstructorHandler) SetMethod ¶
func (h *VCallRequestConstructorHandler) SetMethod(method string)
type WalletAddAmountRequestBody ¶
nolint:unused,deadcode
type WalletAddAmountResponse ¶
nolint:unused
func UnmarshalWalletAddAmountResponse ¶
func UnmarshalWalletAddAmountResponse(resp []byte) (WalletAddAmountResponse, error)
type WalletCreateResponse ¶
type WalletCreateResponse struct { Err string `json:"error"` Ref string `json:"reference"` TraceID string `json:"traceID"` }
func UnmarshalWalletCreateResponse ¶
func UnmarshalWalletCreateResponse(resp []byte) (WalletCreateResponse, error)
type WalletDeleteRequestBody ¶
type WalletDeleteRequestBody struct {
Ref string `json:"walletRef"`
}
nolint:unused,deadcode
type WalletDeleteResponse ¶
nolint:unused,deadcode
func UnmarshalWalletDeleteResponse ¶
func UnmarshalWalletDeleteResponse(resp []byte) (WalletDeleteResponse, error)
type WalletGetBalanceRequestBody ¶
type WalletGetBalanceRequestBody struct {
Ref string `json:"walletRef"`
}
nolint:unused,deadcode
type WalletGetBalanceResponse ¶
type WalletGetBalanceResponse struct { Err string `json:"error"` Amount uint `json:"amount"` TraceID string `json:"traceID"` }
nolint:unused,deadcode
func UnmarshalWalletGetBalanceResponse ¶
func UnmarshalWalletGetBalanceResponse(resp []byte) (WalletGetBalanceResponse, error)
type WalletTransferRequestBody ¶
type WalletTransferRequestBody struct { To string `json:"to"` From string `json:"from"` Amount uint `json:"amount"` }
nolint:unused,deadcode
type WalletTransferResponse ¶
nolint:unused
func UnmarshalWalletTransferResponse ¶
func UnmarshalWalletTransferResponse(resp []byte) (WalletTransferResponse, error)
Click to show internal directories.
Click to hide internal directories.