testutils

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasLogMessage

func HasLogMessage(t *testing.T, want string, logs *bytes.Buffer) bool

HasLogMessage checks if the given test logger logs contain the given message text. It is intended to be used in test cases to verify expected log messages.

func SetupRootLogger

func SetupRootLogger() (context.Context, *bytes.Buffer)

SetupRootLogger initializes a tflogtest root logger that writes to the given bytes.Buffer .It returns a context bound to that logger and the buffer that received the log output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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