package
11.1.0+incompatible
Repository: https://github.com/fastly/cli.git
Documentation: pkg.go.dev

# Functions

AssertBool fatals a test if the parameters aren't equal.
AssertEqual fatals a test if the parameters aren't equal.
AssertErrorContains fatals a test if the error's Error string doesn't contain target.
AssertLength fails a test scenario if the given slice or string does not have the expected length.
AssertNoError fatals a test if the error is not nil.
AssertPathContentFlag errors a test scenario if the given flag value hasn't been parsed as expected.
AssertRemediationErrorContains fatals a test if the error's RemediationError remediation string doesn't contain target.
AssertString fatals a test if the parameters aren't equal.
AssertStringContains fatals a test if the string doesn't contain a substring.
AssertStringDoesntContain fatals a test if the string does contain a substring.
CloneVersionError returns a generic error message when attempting to clone a service version.
CloneVersionResult returns a function which returns a specific cloned version.
CopyFile copies a referenced file to a new location.
GenJSON returns JSON encoding of data, or empty object in case of an error.
ListVersions returns a list of service versions in different states.
ListVersionsError returns a generic error message when attempting to list service versions.
MakeTempFile creates a tempfile with the given contents and returns its path.
MockGlobalData returns a struct that can be used to populate a call to app.Exec() while the majority of fields will be pre-populated and only those fields commonly changed for testing purposes will need to be provided.
MustParseTimeRFC3339 is a small helper to initialize time constants.
NewEnv creates a new test environment and returns the root directory.
RunCLIScenario executes a CLIScenario struct.
RunCLIScenarios executes the CLIScenario structs from the slice passed in.
SplitArgs is a simple wrapper function designed to accept a CLI command (including flags) and return it as a slice for consumption by app.Run().
StripNewLines removes all newline delimiters.
TokenProfile generates a mock profile token.

# Variables

CurrentCustomerResponse is used by `sso` tests.
Date is a consistent date object used by all tests.
Err represents a generic error.
WhoamiBasicResponse is used by `whoami` and `sso` tests.

# Structs

CLIScenario represents a CLI test case to be validated.
EnvConfig provides the details required to setup a temporary test environment, and optionally a function to run which accepts the environment directory and can modify fields in the CLIScenario.
EnvOpts represents configuration when creating a new environment.
FileIO represents a source file and a destination.
LogWriter is used to debug issues with our tests.
MockAuthServer is used to no-op the authentication server.
MockRoundTripper implements [http.RoundTripper] for mocking HTTP responses.
PathContentFlag provides the details required to validate that a flag value has been parsed correctly by the argument parser.
ServicesPaginator mocks the behaviour of a paginator for services.

# Type aliases

CurrentCustomerClient is used by `sso` tests.
WhoamiVerifyClient is used by `whoami` and `sso` tests.