testutil

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchStatusCode added in v0.9.0

func MatchStatusCode(expected any, matchMessage ...types.GomegaMatcher) types.GomegaMatcher

func Must

func Must[T any](t T, err ...error) T

func ProtoEqual added in v0.6.0

func ProtoEqual(expected proto.Message) types.GomegaMatcher

Types

type ProtoMatcher added in v0.6.0

type ProtoMatcher struct {
	Expected proto.Message
}

func (*ProtoMatcher) FailureMessage added in v0.6.0

func (matcher *ProtoMatcher) FailureMessage(actual any) (message string)

func (*ProtoMatcher) Match added in v0.6.0

func (matcher *ProtoMatcher) Match(actual any) (success bool, err error)

func (*ProtoMatcher) NegatedFailureMessage added in v0.6.0

func (matcher *ProtoMatcher) NegatedFailureMessage(actual any) (message string)

type Session

type Session interface {
	G() (*gexec.Session, bool)
	Wait() error
}

func StartCmd

func StartCmd(cmd *exec.Cmd) (Session, error)

type StatusCodeMatcher added in v0.9.0

type StatusCodeMatcher struct {
	Expected any
	// contains filtered or unexported fields
}

func (*StatusCodeMatcher) FailureMessage added in v0.9.0

func (m *StatusCodeMatcher) FailureMessage(actual any) (message string)

func (*StatusCodeMatcher) Match added in v0.9.0

func (m *StatusCodeMatcher) Match(actual any) (success bool, err error)

func (*StatusCodeMatcher) NegatedFailureMessage added in v0.9.0

func (m *StatusCodeMatcher) NegatedFailureMessage(actual any) (message string)

Jump to

Keyboard shortcuts

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