testing

package
v0.0.0-...-cbea63e Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallTestLogger

func InstallTestLogger(t testing.TB) log.LoggerInterface

func InstallTestLoggerWithLogLevel

func InstallTestLoggerWithLogLevel(t testing.TB, logLevel string) log.LoggerInterface

InstallTestLogger will install a logger with appropriate configuration for the current testing setup. It returns a the logger that was overwritten; this should be restored (via a call to RestoreLogger) at the conclusion of the test.

func RestoreLogger

func RestoreLogger(logger log.LoggerInterface)

func RunSuite

func RunSuite(t *testing.T, suite testifysuite.TestingSuite)

Types

type Suite

type Suite struct {
	testifysuite.Suite
	*require.Assertions

	LogLevel string
	// contains filtered or unexported fields
}

Suite is a basic testing suite with methods for storing and retrieving the current *testing.T context. It also sets logging levels appropriately for each test (silencing anything lower than WARN level)

func (*Suite) SetupSuite

func (s *Suite) SetupSuite()

func (*Suite) SetupTest

func (s *Suite) SetupTest()

func (*Suite) TearDownSuite

func (s *Suite) TearDownSuite()

func (*Suite) TearDownTest

func (s *Suite) TearDownTest()

Jump to

Keyboard shortcuts

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