Documentation
¶
Index ¶
Constants ¶
const EnvToCheckSkip = "E2E_TESTS"
Variables ¶
This section is empty.
Functions ¶
func MaybeSkipTest ¶
MaybeSkipTest is a check used at the start of the test to determine if the test should run
Types ¶
type CommandResult ¶
CommandResult captures the output from running an external command
func RunCommand ¶
func RunCommand(ctx context.Context, command string, opt ...Option) *CommandResult
RunCommand executes external commands on the system. Returns the results of running the provided command.
RunCommand(context.Background(), "ls")
RunCommand(context.Background(), "ls", WithArgs("-al", "/path"))
CommandResult is always valid even if there is an error.
type Option ¶ added in v0.12.0
type Option func(*options)
Option is a func that sets optional attributes for a call. This does not need to be used directly, but instead option arguments are built from the functions in this package. WithX options set a value to that given in the argument; DefaultX options indicate that the value should be set to its default. When an API call is made options are processed in ther order they appear in the function call, so for a given argument X, a succession of WithX or DefaultX calls will result in the last call taking effect.
func WithArgs ¶ added in v0.12.0
WithArgs is an option to RunCommand that allows the user to specify arguments for the provided command. This option can be used multiple times in one command.
RunCommand(context.Background(), "ls", WithArgs("-al"))
func WithEnv ¶ added in v0.12.0
WithEnv is an option to RunCommand that allows the user to specify environment variables to be set when running the command. This option can be used multiple times in one command.
RunCommand(context.Background(), "ls", WithEnv("NAME", "VALUE"), WithEnv("NAME", "VALUE"))
Directories
¶
| Path | Synopsis |
|---|---|
|
Package boundary provides methods for commonly used boundary actions that are used in end-to-end tests.
|
Package boundary provides methods for commonly used boundary actions that are used in end-to-end tests. |
|
Package vault provides methods for commonly used vault actions that are used in end-to-end tests.
|
Package vault provides methods for commonly used vault actions that are used in end-to-end tests. |