test

package
v0.7.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TestLogLevelEnvVar = "TEST_LOG_LEVEL" // export this env var before running tests if DEBUG level is needed
	SethConfigPath     = "seth.toml"
	SettingsTarget     = "staging-settings"
)

Variables

View Source
var CLIPath = os.TempDir() + string(os.PathSeparator) + "cre" + func() string {
	if os.PathSeparator == '\\' {
		return ".exe"
	}
	return ""
}()

CLI path for testing (also defined in multi_command_flows for their use)

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, stateFileName string) (*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
	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) GetProjectRootFlag

func (tc *TestConfig) GetProjectRootFlag() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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