Documentation ¶
Index ¶
- Constants
- Variables
- type Assertion
- func (assertion *Assertion) Error() types.Assertion
- func (assertion *Assertion) NotTo(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *Assertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *Assertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *Assertion) To(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *Assertion) ToNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *Assertion) WithOffset(offset int) types.Assertion
- type AsyncAssertion
- func (assertion *AsyncAssertion) MustPassRepeatedly(count int) types.AsyncAssertion
- func (assertion *AsyncAssertion) ProbeEvery(interval time.Duration) types.AsyncAssertion
- func (assertion *AsyncAssertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *AsyncAssertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
- func (assertion *AsyncAssertion) WithArguments(argsToForward ...interface{}) types.AsyncAssertion
- func (assertion *AsyncAssertion) WithContext(ctx context.Context) types.AsyncAssertion
- func (assertion *AsyncAssertion) WithOffset(offset int) types.AsyncAssertion
- func (assertion *AsyncAssertion) WithPolling(interval time.Duration) types.AsyncAssertion
- func (assertion *AsyncAssertion) WithTimeout(interval time.Duration) types.AsyncAssertion
- func (assertion *AsyncAssertion) Within(timeout time.Duration) types.AsyncAssertion
- type AsyncAssertionType
- type DurationBundle
- type Gomega
- func (g *Gomega) ConfigureWithFailHandler(fail types.GomegaFailHandler) *Gomega
- func (g *Gomega) ConfigureWithT(t types.GomegaTestingT) *Gomega
- func (g *Gomega) Consistently(actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
- func (g *Gomega) ConsistentlyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
- func (g *Gomega) Eventually(actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
- func (g *Gomega) EventuallyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
- func (g *Gomega) Expect(actual interface{}, extra ...interface{}) types.Assertion
- func (g *Gomega) ExpectWithOffset(offset int, actual interface{}, extra ...interface{}) types.Assertion
- func (g *Gomega) IsConfigured() bool
- func (g *Gomega) SetDefaultConsistentlyDuration(t time.Duration)
- func (g *Gomega) SetDefaultConsistentlyPollingInterval(t time.Duration)
- func (g *Gomega) SetDefaultEventuallyPollingInterval(t time.Duration)
- func (g *Gomega) SetDefaultEventuallyTimeout(t time.Duration)
- func (g *Gomega) Ω(actual interface{}, extra ...interface{}) types.Assertion
- type PollingSignalError
- type PollingSignalErrorAttachment
- type PollingSignalErrorImpl
- func (s *PollingSignalErrorImpl) Attach(description string, obj any) PollingSignalError
- func (s *PollingSignalErrorImpl) Error() string
- func (s *PollingSignalErrorImpl) IsStopTrying() bool
- func (s *PollingSignalErrorImpl) IsTryAgainAfter() bool
- func (s *PollingSignalErrorImpl) Now()
- func (s *PollingSignalErrorImpl) TryAgainDuration() time.Duration
- func (s *PollingSignalErrorImpl) Unwrap() error
- func (s *PollingSignalErrorImpl) Wrap(err error) PollingSignalError
- type PollingSignalErrorType
Constants ¶
View Source
const ( EventuallyTimeoutEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT" EventuallyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_POLLING_INTERVAL" ConsistentlyDurationEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_DURATION" ConsistentlyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_POLLING_INTERVAL" )
Variables ¶
View Source
var StopTrying = func(message string) PollingSignalError { return &PollingSignalErrorImpl{ message: message, pollingSignalErrorType: PollingSignalErrorTypeStopTrying, } }
View Source
var TryAgainAfter = func(duration time.Duration) PollingSignalError { return &PollingSignalErrorImpl{ message: fmt.Sprintf("told to try again after %s", duration), duration: duration, pollingSignalErrorType: PollingSignalErrorTypeTryAgainAfter, } }
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
// contains filtered or unexported fields
}
func NewAssertion ¶
func (*Assertion) NotTo ¶
func (assertion *Assertion) NotTo(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
func (*Assertion) Should ¶
func (assertion *Assertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
func (*Assertion) ShouldNot ¶
func (assertion *Assertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
func (*Assertion) To ¶
func (assertion *Assertion) To(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
type AsyncAssertion ¶
type AsyncAssertion struct {
// contains filtered or unexported fields
}
func NewAsyncAssertion ¶
func (*AsyncAssertion) MustPassRepeatedly ¶ added in v1.25.0
func (assertion *AsyncAssertion) MustPassRepeatedly(count int) types.AsyncAssertion
func (*AsyncAssertion) ProbeEvery ¶ added in v1.21.0
func (assertion *AsyncAssertion) ProbeEvery(interval time.Duration) types.AsyncAssertion
func (*AsyncAssertion) Should ¶
func (assertion *AsyncAssertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
func (*AsyncAssertion) ShouldNot ¶
func (assertion *AsyncAssertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool
func (*AsyncAssertion) WithArguments ¶ added in v1.22.0
func (assertion *AsyncAssertion) WithArguments(argsToForward ...interface{}) types.AsyncAssertion
func (*AsyncAssertion) WithContext ¶ added in v1.21.0
func (assertion *AsyncAssertion) WithContext(ctx context.Context) types.AsyncAssertion
func (*AsyncAssertion) WithOffset ¶ added in v1.17.0
func (assertion *AsyncAssertion) WithOffset(offset int) types.AsyncAssertion
func (*AsyncAssertion) WithPolling ¶ added in v1.17.0
func (assertion *AsyncAssertion) WithPolling(interval time.Duration) types.AsyncAssertion
func (*AsyncAssertion) WithTimeout ¶ added in v1.17.0
func (assertion *AsyncAssertion) WithTimeout(interval time.Duration) types.AsyncAssertion
func (*AsyncAssertion) Within ¶ added in v1.21.0
func (assertion *AsyncAssertion) Within(timeout time.Duration) types.AsyncAssertion
type AsyncAssertionType ¶
type AsyncAssertionType uint
const ( AsyncAssertionTypeEventually AsyncAssertionType = iota AsyncAssertionTypeConsistently )
func (AsyncAssertionType) String ¶ added in v1.22.0
func (at AsyncAssertionType) String() string
type DurationBundle ¶
type DurationBundle struct { EventuallyTimeout time.Duration EventuallyPollingInterval time.Duration ConsistentlyDuration time.Duration ConsistentlyPollingInterval time.Duration }
func FetchDefaultDurationBundle ¶
func FetchDefaultDurationBundle() DurationBundle
type Gomega ¶
type Gomega struct { Fail types.GomegaFailHandler THelper func() DurationBundle DurationBundle }
func NewGomega ¶
func NewGomega(bundle DurationBundle) *Gomega
func (*Gomega) ConfigureWithFailHandler ¶
func (g *Gomega) ConfigureWithFailHandler(fail types.GomegaFailHandler) *Gomega
func (*Gomega) ConfigureWithT ¶
func (g *Gomega) ConfigureWithT(t types.GomegaTestingT) *Gomega
func (*Gomega) Consistently ¶
func (g *Gomega) Consistently(actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
func (*Gomega) ConsistentlyWithOffset ¶
func (g *Gomega) ConsistentlyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
func (*Gomega) Eventually ¶
func (g *Gomega) Eventually(actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
func (*Gomega) EventuallyWithOffset ¶
func (g *Gomega) EventuallyWithOffset(offset int, actualOrCtx interface{}, args ...interface{}) types.AsyncAssertion
func (*Gomega) ExpectWithOffset ¶
func (*Gomega) IsConfigured ¶
func (*Gomega) SetDefaultConsistentlyDuration ¶
func (*Gomega) SetDefaultConsistentlyPollingInterval ¶
func (*Gomega) SetDefaultEventuallyPollingInterval ¶
func (*Gomega) SetDefaultEventuallyTimeout ¶
type PollingSignalError ¶ added in v1.23.0
type PollingSignalError interface { error Wrap(err error) PollingSignalError Attach(description string, obj any) PollingSignalError Now() }
type PollingSignalErrorAttachment ¶ added in v1.23.0
type PollingSignalErrorImpl ¶ added in v1.23.0
type PollingSignalErrorImpl struct { Attachments []PollingSignalErrorAttachment // contains filtered or unexported fields }
func AsPollingSignalError ¶ added in v1.23.0
func AsPollingSignalError(actual interface{}) (*PollingSignalErrorImpl, bool)
func (*PollingSignalErrorImpl) Attach ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) Attach(description string, obj any) PollingSignalError
func (*PollingSignalErrorImpl) Error ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) Error() string
func (*PollingSignalErrorImpl) IsStopTrying ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) IsStopTrying() bool
func (*PollingSignalErrorImpl) IsTryAgainAfter ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) IsTryAgainAfter() bool
func (*PollingSignalErrorImpl) Now ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) Now()
func (*PollingSignalErrorImpl) TryAgainDuration ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) TryAgainDuration() time.Duration
func (*PollingSignalErrorImpl) Unwrap ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) Unwrap() error
func (*PollingSignalErrorImpl) Wrap ¶ added in v1.23.0
func (s *PollingSignalErrorImpl) Wrap(err error) PollingSignalError
type PollingSignalErrorType ¶ added in v1.23.0
type PollingSignalErrorType int
const ( PollingSignalErrorTypeStopTrying PollingSignalErrorType = iota PollingSignalErrorTypeTryAgainAfter )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.