cerealtest

package
v0.0.0-...-cdf27b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCancelEvent

func NewCancelEvent() cereal.CancelEvent

func NewStartEvent

func NewStartEvent() cereal.StartEvent

func NewTaskCompleteEvent

func NewTaskCompleteEvent(taskName cereal.TaskName, tr cereal.TaskResult) cereal.TaskCompleteEvent

Types

type TaskResult

type TaskResult struct {
	// contains filtered or unexported fields
}

func NewTaskResult

func NewTaskResult(t *testing.T) *TaskResult

func (*TaskResult) Err

func (tr *TaskResult) Err() error

func (*TaskResult) Get

func (tr *TaskResult) Get(obj interface{}) error

func (*TaskResult) GetParameters

func (tr *TaskResult) GetParameters(obj interface{}) error

func (*TaskResult) WithError

func (tr *TaskResult) WithError(err error) *TaskResult

func (*TaskResult) WithParameters

func (tr *TaskResult) WithParameters(obj interface{}) *TaskResult

func (*TaskResult) WithResult

func (tr *TaskResult) WithResult(obj interface{}) *TaskResult

type TestableCompleteDecision

type TestableCompleteDecision struct {
	// contains filtered or unexported fields
}

func (*TestableCompleteDecision) GetResult

func (d *TestableCompleteDecision) GetResult(obj interface{})

type TestableContinueDecision

type TestableContinueDecision struct {
	// contains filtered or unexported fields
}

func (*TestableContinueDecision) AssertNoTasksEnqueued

func (d *TestableContinueDecision) AssertNoTasksEnqueued()

func (*TestableContinueDecision) AssertTaskEnqueued

func (d *TestableContinueDecision) AssertTaskEnqueued(taskName cereal.TaskName) *TestableTaskEnqueued

func (*TestableContinueDecision) GetPayload

func (d *TestableContinueDecision) GetPayload(obj interface{})

type TestableDecision

type TestableDecision struct {
	Complete *TestableCompleteDecision
	Fail     *TestableFailDecision
	Continue *TestableContinueDecision
}

type TestableFailDecision

type TestableFailDecision struct {
	Err error
	// contains filtered or unexported fields
}

func (*TestableFailDecision) WithErrorEqual

func (d *TestableFailDecision) WithErrorEqual(err error) *TestableFailDecision

type TestableTask

type TestableTask struct {
	Name cereal.TaskName
	Opts cereal.TaskEnqueueOptions
	// contains filtered or unexported fields
}

func (*TestableTask) GetParameters

func (d *TestableTask) GetParameters(obj interface{})

type TestableTaskEnqueued

type TestableTaskEnqueued struct {
	Tasks []*TestableTask
	// contains filtered or unexported fields
}

func (*TestableTaskEnqueued) AssertCount

func (t *TestableTaskEnqueued) AssertCount(c int) *TestableTaskEnqueued

type WorkflowInstance

type WorkflowInstance struct {
	// contains filtered or unexported fields
}

func NewWorkflowInstance

func NewWorkflowInstance(t *testing.T, instanceName string) *WorkflowInstance

func (*WorkflowInstance) AssertComplete

func (w *WorkflowInstance) AssertComplete() *TestableCompleteDecision

func (*WorkflowInstance) AssertContinuing

func (w *WorkflowInstance) AssertContinuing() *TestableContinueDecision

func (*WorkflowInstance) AssertFailed

func (w *WorkflowInstance) AssertFailed() *TestableFailDecision

func (*WorkflowInstance) Complete

func (w *WorkflowInstance) Complete(opts ...cereal.CompleteOpt) cereal.Decision

func (*WorkflowInstance) Continue

func (w *WorkflowInstance) Continue(payload interface{}) cereal.Decision

func (*WorkflowInstance) EnqueueTask

func (w *WorkflowInstance) EnqueueTask(taskName cereal.TaskName, parameters interface{}, opts ...cereal.TaskEnqueueOpt) error

func (*WorkflowInstance) Fail

func (w *WorkflowInstance) Fail(err error) cereal.Decision

func (*WorkflowInstance) GetParameters

func (w *WorkflowInstance) GetParameters(obj interface{}) error

func (*WorkflowInstance) GetPayload

func (w *WorkflowInstance) GetPayload(obj interface{}) error

func (*WorkflowInstance) InstanceName

func (w *WorkflowInstance) InstanceName() string

func (*WorkflowInstance) ResetOutput

func (w *WorkflowInstance) ResetOutput()

func (*WorkflowInstance) TotalCompletedTasks

func (w *WorkflowInstance) TotalCompletedTasks() int

func (*WorkflowInstance) TotalEnqueuedTasks

func (w *WorkflowInstance) TotalEnqueuedTasks() int

func (*WorkflowInstance) WithNumCompletedTasks

func (w *WorkflowInstance) WithNumCompletedTasks(numCompletedTasks int) *WorkflowInstance

func (*WorkflowInstance) WithNumEnqueuedTasks

func (w *WorkflowInstance) WithNumEnqueuedTasks(numEnqueuedTasks int) *WorkflowInstance

func (*WorkflowInstance) WithParameters

func (w *WorkflowInstance) WithParameters(obj interface{}) *WorkflowInstance

func (*WorkflowInstance) WithPayload

func (w *WorkflowInstance) WithPayload(obj interface{}) *WorkflowInstance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL