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)
View Source
var (
L *zerolog.Logger
)
Functions ¶
func InitLogging ¶
func InitLogging()
func LookupAndUnsetEnvVar ¶
func RestoreEnvVar ¶
func StartAnvil ¶
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)
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
Click to show internal directories.
Click to hide internal directories.