Documentation
¶
Index ¶
- func WithCaptureAll() func(*options)
- func WithStderrLineContains(lines ...string) func(*options)
- func WithStdoutLineContains(lines ...string) func(*options)
- type LogLine
- func (l *LogLine) Cleanup(t *testing.T)
- func (l *LogLine) Contains(s string) bool
- func (l *LogLine) Count(substr string) int
- func (l *LogLine) EventuallyContains(t assert.TestingT, substr string, timeout time.Duration, tick time.Duration) bool
- func (l *LogLine) EventuallyFoundAll(t *testing.T)
- func (l *LogLine) EventuallyFoundNone(t *testing.T)
- func (l *LogLine) FoundAll() bool
- func (l *LogLine) FoundNone() bool
- func (l *LogLine) Run(t *testing.T, ctx context.Context)
- func (l *LogLine) Stderr() io.WriteCloser
- func (l *LogLine) Stdout() io.WriteCloser
- func (l *LogLine) StdoutBuffer() []byte
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCaptureAll ¶ added in v1.17.21
func WithCaptureAll() func(*options)
WithCaptureAll keeps capturing output when no expected lines are configured, for tests which inspect the log with Contains or Count.
func WithStderrLineContains ¶
func WithStderrLineContains(lines ...string) func(*options)
func WithStdoutLineContains ¶
func WithStdoutLineContains(lines ...string) func(*options)
Types ¶
type LogLine ¶
type LogLine struct {
// contains filtered or unexported fields
}
func (*LogLine) Count ¶ added in v1.17.21
Count returns how many times substr appears in the output captured so far.
func (*LogLine) EventuallyContains ¶ added in v1.17.21
func (*LogLine) EventuallyFoundAll ¶
func (*LogLine) EventuallyFoundNone ¶ added in v1.16.1
func (*LogLine) Stderr ¶
func (l *LogLine) Stderr() io.WriteCloser
func (*LogLine) Stdout ¶
func (l *LogLine) Stdout() io.WriteCloser
func (*LogLine) StdoutBuffer ¶ added in v1.16.4
Click to show internal directories.
Click to hide internal directories.