Documentation ¶
Index ¶
- Variables
- func IfCI[T any](t T) ifExpr[T]
- func IfTesting[T any](t T) ifExpr[T]
- func MergeCoverProfiles(filenames []string, output io.Writer, opts ...ProfileOption) error
- 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 ProfileOption
- type ProfileOptions
- type ProtoMatcher
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IsTesting = strings.HasSuffix(os.Args[0], ".test") IsGithubActions = os.Getenv("GITHUB_ACTIONS") == "true" IsDrone = os.Getenv("DRONE") == "true" StdoutWriter = lo.Ternary[io.Writer](IsTesting, ginkgo.GinkgoWriter, os.Stdout) StderrWriter = lo.Ternary[io.Writer](IsTesting, ginkgo.GinkgoWriter, os.Stderr) )
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 MergeCoverProfiles ¶ added in v0.4.2
func MergeCoverProfiles(filenames []string, output io.Writer, opts ...ProfileOption) error
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 ProfileOption ¶ added in v0.4.2
type ProfileOption func(*ProfileOptions)
func WithExcludePatterns ¶ added in v0.4.2
func WithExcludePatterns(excludePatterns ...string) ProfileOption
func WithKeepMergedProfiles ¶ added in v0.4.2
func WithKeepMergedProfiles(keep bool) ProfileOption
type ProfileOptions ¶ added in v0.4.2
type ProfileOptions struct {
// contains filtered or unexported fields
}
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)
Click to show internal directories.
Click to hide internal directories.