logtesting

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertLogEventsEqual

func AssertLogEventsEqual(t *testing.T, expected logur.LogEvent, actual logur.LogEvent)

AssertLogEventsEqual asserts that two LogEvents are identical.

Types

type LoggerTestSuite

type LoggerTestSuite struct {
	LoggerFactory func(level logur.Level) (logur.Logger, func() []logur.LogEvent)

	TraceFallbackToDebug bool
}

LoggerTestSuite implements a minimal set of tests that every logur compatible logger implementation must satisfy.

func (*LoggerTestSuite) Execute deprecated

func (s *LoggerTestSuite) Execute(t *testing.T)

Execute executes the complete test suite.

Deprecated: use logur.dev/conformance.TestSuite.Run.

func (*LoggerTestSuite) TestLevelEnabler deprecated

func (s *LoggerTestSuite) TestLevelEnabler(t *testing.T)

TestLevelEnabler tests enabled levels. Note: this is not mandatory, incompatible loggers will be skipped.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelEnablerTest.

func (*LoggerTestSuite) TestLevelEnablerUnknownReturnsTrue deprecated

func (s *LoggerTestSuite) TestLevelEnablerUnknownReturnsTrue(t *testing.T)

TestLevelEnablerUnknownReturnsTrue tests unknown enabled levels. Note: this is not mandatory, incompatible loggers will be skipped.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelEnablerTest.

func (*LoggerTestSuite) TestLevels deprecated

func (s *LoggerTestSuite) TestLevels(t *testing.T)

TestLevels tests leveled logging capabilities.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelTest.

func (*LoggerTestSuite) TestLevelsContext deprecated added in v0.16.0

func (s *LoggerTestSuite) TestLevelsContext(t *testing.T)

TestLevelsContext tests leveled logging capabilities of a LoggerContext instance.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelContextTest.

Jump to

Keyboard shortcuts

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