test

package
v0.0.0-...-dc3d0b8 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeParam

func DecodeParam[P any](payload *testsv1.Payload) (P, error)

func DecodeTemporalParam

func DecodeTemporalParam[P any](payload *common.Payload) (P, error)

func ExecuteTest

func ExecuteTest(ctx workflow.Context, wf func(ctx workflow.Context)) error

func GetPendingError

func GetPendingError(pending *Pending) error

func GetPendingFuture

func GetPendingFuture(pending *Pending) workflow.Future

func ResultChanFromContext

func ResultChanFromContext(ctx context.Context) chan<- any

Types

type CaseExecutor

type CaseExecutor func(ctx context.Context, payload *common.Payload) (any, error)

type CaseResponse

type CaseResponse[T any] struct {
	Result   T
	Finished time.Time
	Duration time.Duration
}

func ExecuteCase

func ExecuteCase(ctx context.Context, a func(ctx context.Context)) (*CaseResponse[any], error)

type Pending

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

func NewPending

func NewPending(id test.CaseExecutionID, name string, base workflow.Future) *Pending

func NewPendingError

func NewPendingError(id test.CaseExecutionID, name string, err error) *Pending

func (*Pending) IsReady

func (p *Pending) IsReady() bool

type TestExecutor

type TestExecutor func(ctx workflow.Context, payload *testsv1.Payload) error

Jump to

Keyboard shortcuts

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