testutils

package
v0.1.0-preview.1.rc Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigContextKey ctxKey = "ConfigWithContextConfig"

ConfigContextKey identifies the ConfigWithContextConfig in context

Variables

This section is empty.

Functions

func CaptureOutput

func CaptureOutput(fn func()) (stdout string, stderr string)

func CreateTempAVSProject

func CreateTempAVSProject(t *testing.T) (string, error)

helper to create a temp AVS project dir with config.yaml copied

func CreateTestAppWithNoopLoggerAndAccess added in v0.0.9

func CreateTestAppWithNoopLoggerAndAccess(name string, flags []cli.Flag, action cli.ActionFunc) (*cli.App, *logger.NoopLogger)

CreateTestAppWithNoopLoggerAndAccess creates a CLI app with no-op logger and returns both app and logger

func FindSubcommandByName

func FindSubcommandByName(name string, commands []*cli.Command) *cli.Command

func WithTestConfig

func WithTestConfig(cmd *cli.Command) *cli.Command

func WithTestConfigAndNoopLogger added in v0.0.9

func WithTestConfigAndNoopLogger(cmd *cli.Command) *cli.Command

WithTestConfigAndNoopLogger sets up a test configuration and no-op logger for silent testing

func WithTestConfigAndNoopLoggerAndAccess added in v0.0.9

func WithTestConfigAndNoopLoggerAndAccess(cmd *cli.Command) (*cli.Command, *logger.NoopLogger)

WithTestConfigAndNoopLoggerAndAccess sets up test config and no-op logger, returning both command and logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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