utils

package
v0.0.0-...-0b7126b Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0, BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecTestCount

func DecTestCount(ctx context.Context) int64

func Finish

func Finish(ctx context.Context) error

func GetPackageAndName

func GetPackageAndName(pc uintptr) (string, string)

func GetParent

func GetParent(ctx context.Context) context.Context

func GetSuiteName

func GetSuiteName() string

func GetTestCount

func GetTestCount(ctx context.Context) int64

func IncTestCount

func IncTestCount(ctx context.Context) int64

func IncrementOffset

func IncrementOffset(additionalOffset ginkgo.Offset, args ...interface{}) []interface{}

func PatchArgs

func PatchArgs(begin, end func() error, args ...interface{}) []interface{}

func PatchArgsNoArgs

func PatchArgsNoArgs(begin, end func() error, args ...interface{}) []interface{}

func PatchFuncs

func PatchFuncs(begin, end func() error, funcs ...func()) []func()

func WithFinish

func WithFinish(ctx context.Context, finish func()) context.Context

func WithParent

func WithParent(ctx context.Context, parent context.Context) context.Context

func WithTestCount

func WithTestCount(ctx context.Context, count int64) context.Context

Types

type Snapshot

type Snapshot struct {
	FrameworkName string
	// contains filtered or unexported fields
}

func (*Snapshot) RegisterTest

func (s *Snapshot) RegisterTest() TestCase

type State

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

func NewState

func NewState(ctx context.Context) *State

func (*State) GetContexts

func (s *State) GetContexts() []context.Context

GetContexts returns all contexts in the current stack.

func (*State) Pop

func (s *State) Pop() error

func (*State) Push

func (s *State) Push(ctx context.Context)

type SuiteTest

type SuiteTest struct {
	sync.Mutex

	TestFrameworkName string
	// contains filtered or unexported fields
}

func NewSuiteTest

func NewSuiteTest(frameworkName string) *SuiteTest

func (*SuiteTest) Close

func (s *SuiteTest) Close() error

func (*SuiteTest) Context

func (s *SuiteTest) Context() context.Context

func (*SuiteTest) EnterContainer

func (s *SuiteTest) EnterContainer(stepName string, text string) error

func (*SuiteTest) LeaveContainer

func (s *SuiteTest) LeaveContainer() error

func (*SuiteTest) Snapshot

func (s *SuiteTest) Snapshot() *Snapshot

type TestCase

type TestCase interface {
	Enter(stepName, suiteName string) error
	Leave() error
}

Jump to

Keyboard shortcuts

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