testhelpers

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpDiff

func CmpDiff(t *testing.T, methodUnderTest string, testCase string, desc string, want interface{}, got interface{}) bool

func ExpectPanic

func ExpectPanic(t *testing.T, methodUnderTest string, testCase string, wantPanic string)

func ExpectPanicWithOutput

func ExpectPanicWithOutput(t *testing.T, methodUnderTest string, testCase string, out fmt.Stringer, wantPanic string)

func HomelabBaseDir

func HomelabBaseDir() string

func LogCustom

func LogCustom(t *testing.T, methodUnderTest string, testCase string, custom string)

func LogCustomWithOutput

func LogCustomWithOutput(t *testing.T, methodUnderTest string, testCase string, out fmt.Stringer, custom string)

func LogErrorNil

func LogErrorNil(t *testing.T, methodUnderTest string, testCase string, want string)

func LogErrorNilWithOutput

func LogErrorNilWithOutput(t *testing.T, methodUnderTest string, testCase string, out fmt.Stringer, want string)

func LogErrorNotNil

func LogErrorNotNil(t *testing.T, methodUnderTest string, testCase string, gotErr error)

func LogErrorNotNilWithOutput

func LogErrorNotNilWithOutput(t *testing.T, methodUnderTest string, testCase string, out fmt.Stringer, gotErr error)

func NewInt

func NewInt(i int) *int

func NewLogLevel

func NewLogLevel(lvl tuxlog.Level) *tuxlog.Level

func Pwd

func Pwd() string

func RegexMatch

func RegexMatch(t *testing.T, methodUnderTest string, testCase string, desc string, want string, got string) bool

func RegexMatchJoinNewLines

func RegexMatchJoinNewLines(t *testing.T, methodUnderTest string, testCase string, desc string, want string, got string) bool

func RegexMatchWithOutput

func RegexMatchWithOutput(t *testing.T, methodUnderTest string, testCase string, out fmt.Stringer, desc string, want string, got string) bool

func SetTestEnv

func SetTestEnv(t *testing.T, envs TestEnvMap)

Types

type TestEnvMap

type TestEnvMap map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳