Documentation ¶
Index ¶
- Variables
- func MatchStatusCode(expected any, matchMessage ...types.GomegaMatcher) types.GomegaMatcher
- func Must[T any](t T, err ...error) T
- func NewTestLogger() logr.Logger
- func PortForward(ctx context.Context, service types.NamespacedName, servicePorts []string, ...) ([]portforward.ForwardedPort, error)
- func ProtoEqual(expected proto.Message) types.GomegaMatcher
- type ProtoMatcher
- type Session
- type StatusCodeMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var EncoderConfig = zapcore.EncoderConfig{ MessageKey: "M", LevelKey: "L", TimeKey: "T", NameKey: "N", CallerKey: "C", FunctionKey: "", StacktraceKey: "S", ConsoleSeparator: " ", EncodeLevel: zapcore.CapitalColorLevelEncoder, EncodeCaller: func(ec zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(chalk.Dim.TextStyle(ec.TrimmedPath())) }, EncodeName: func(name string, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(chalk.Dim.TextStyle( strings.Replace(name, "controller-runtime.manager.", "", 1))) }, EncodeTime: func(t time.Time, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(t.Format("[15:04:05]")) }, EncodeDuration: zapcore.SecondsDurationEncoder, }
Functions ¶
func MatchStatusCode ¶ added in v0.9.0
func MatchStatusCode(expected any, matchMessage ...types.GomegaMatcher) types.GomegaMatcher
func NewTestLogger ¶ added in v0.6.0
func PortForward ¶ added in v0.5.4
func PortForward( ctx context.Context, service types.NamespacedName, servicePorts []string, restConfig *rest.Config, scheme *runtime.Scheme, ) ([]portforward.ForwardedPort, error)
func ProtoEqual ¶ added in v0.6.0
func ProtoEqual(expected proto.Message) types.GomegaMatcher
Types ¶
type ProtoMatcher ¶ added in v0.6.0
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 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 (matcher *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 (matcher *StatusCodeMatcher) NegatedFailureMessage(actual any) (message string)
Click to show internal directories.
Click to hide internal directories.