test

package
v0.5.1-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestLogLevelEnvVar = "TEST_LOG_LEVEL" // export this env var before running tests if DEBUG level is needed
)

Variables

Functions

func InitLogging

func InitLogging()

func LookupAndUnsetEnvVar

func LookupAndUnsetEnvVar(envVar string) string

func RestoreEnvVar

func RestoreEnvVar(envVar string, value string)

func StartAnvil

func StartAnvil(initState AnvilInitState) (*os.Process, int, error)

Boot Anvil by either loading Anvil state or running a fresh instance that will dump its state on exit Input parameter can be LOAD_ANVIL_STATE=true or DUMP_ANVIL_STATE=false (look at the defined constants)

func StopAnvil

func StopAnvil(anvilProc *os.Process)

Types

type AnvilInitState

type AnvilInitState int

needed for StartAnvil() function, describes how to boot Anvil

const (
	LOAD_ANVIL_STATE AnvilInitState = iota
	DUMP_ANVIL_STATE AnvilInitState = iota
)

type TestConfig

type TestConfig struct {
	EnvFile              string
	WorkflowSettingsFile string
	ProposalDirectory    string
	ProjectDirectory     string
	// contains filtered or unexported fields
}

func NewTestConfig

func NewTestConfig(t *testing.T) *TestConfig

func (*TestConfig) Cleanup

func (tc *TestConfig) Cleanup(t *testing.T) func()

func (*TestConfig) GetCliEnvFlag

func (tc *TestConfig) GetCliEnvFlag() string

func (*TestConfig) GetCliSettingsFlag

func (tc *TestConfig) GetCliSettingsFlag() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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