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

# Packages

No description provided by the author
No description provided by the author

# Functions

AddEmptyPaginatedResponse adds a mock handler to the given server which returns a response with no resources.
AddFiftyOneOrgs adds a mock handler to the given server which returns 51 orgs on GET requests to /v3/organizations?order_by=name.
AddFiftyOneSpaces adds mock handlers to the given http server which includes an organization which will contain 51 spaces.
AddHandler adds a mock handler to the server making a request specified by "method" to the endpoint specified by "pathAndQuery", returning a response with status code "status" and response body "body".
AddLoginRoutes adds a mock handler to the given server which returns an access token and a 200 status code on POST requests to /oauth/token.
AddMfa adds a mock handler to the given server which returns a login response and a 200 status code on GET requests to the /login endpoint.
AddOrReplaceEnvironment will update environment if it already exists or will add a new environment with the given environment name and details.
AppGUID returns the GUID for an app in the currently targeted space.
AppJSON returns the JSON representation of an app by name.
BuildConfigurablePlugin builds a plugin of type pluginType from the integration/assets/<pluginType> directory with the given name, version, and commands.
No description provided by the author
BuildpacksOutputRegex takes a BuildpackFields struct and returns a regex matching a line in the output of 'cf buildpacks' representing the given buildpack.
BuildpackWithoutStack makes a simple buildpack without a stack (using MakeBuildpackArchive) and yields it to the given function, removing the zip at the end.
BuildpackWithStack makes a simple buildpack for the given stack (using MakeBuildpackArchive) and yields it to the given function, removing the zip at the end.
BuildTokenString returns a string typed JSON web token with the specified expiration time.
CF runs a 'cf' command with given arguments.
CFWithEnv runs a 'cf' command with specified environment variables and given arguments.
CFWithStdin runs a 'cf' command with a custom stdin and given arguments.
CheckEnvironmentTargetedCorrectly will confirm if the command requires an API to be targeted and logged in to run.
No description provided by the author
No description provided by the author
ClearTarget logs out and logs back in to the CLI using LogoutCF and LoginCF.
No description provided by the author
ConfirmStagingLogs checks session for log output indicating that staging is working.
ConvertPathToRegularExpression converts a windows file path into a string which may be embedded in a ginkgo-compatible regular expression.
CreateAndTargetOrg creates a randomly-named org and targets it.
CreateApp creates an empty app in CloudController with no package or droplet.
CreateCCV2Client constructs a client object able to communicate with the cloudcontroller V2 API.
CreateOrg creates an org with the given name using 'cf create-org'.
CreateOrgAndSpace creates an org and a space in that org with specified names.
CreateOrgAndSpaceUnlessExists creates an org and a space in that org with specified names only if these don't exist yet.
CreateSecurityGroup Creates a new security group on the API using the 'cf create-security-group'.
CreateSpace creates a space with the given name using 'cf create-space'.
CreateStack creates a new stack with the user provided name.
CreateStackWithGUID creates a stack with a random name and returns its name and guid.
CreateUser creates a user with a random username and password and returns both.
CreateUserInOrgRole creates a user with a random username and password and gives them the specified role within a specific org.
CreateUserInSpaceRole creates a user with a random username and password and gives them the specified role within a specific space.
Curl runs a 'cf curl' command with a URL format string, allowing props to be interpolated into the URL string with fmt.Sprintf.
CustomCF runs a 'cf' command with a custom environment and given arguments.
DebugCustomCF runs a 'cf' command with a custom environment and given arguments, with CF_LOG_LEVEL set to 'debug'.
DefaultSharedDomain runs 'cf domains' to find the default domain, caching the result so that the same domain is returned each time it is called.
DeleteBuildpackIfOnOldCCAPI deletes the buildpack if the CC API targeted by the current test run is <= 2.80.0.
DeleteSecurityGroup Deletes a security group on the API using the 'cf delete-security-group'.
DeleteStack deletes a specific stack.
DeleteUser deletes the user specified by username.
DestroyHomeDir safely removes the given directory checking for errors.
DisableFeatureFlag disables given feature flag with 'cf disable-feature-flag'.
DomainName returns a random domain name, with a given prefix if provided.
EnableFeatureFlag enables given feature flag with 'cf enable-feature-flag'.
EnsureMinimumNumberOfStacks ensures there are at least <num> stacks in the foundation by creating new ones if there are fewer than the specified number.
ExpiredAccessToken returns an example expired bearer token.
FetchStacks returns all the stack names present in the foundation.
FindOrCreateTCPRouterGroup uses the routing API to find a router group with name INTEGRATION-TCP-NODE-<node>, or create one if it does not exist.
GenerateHigherName will use the passed randomNameGenerator to generate a name with a higher sort value than all the passed names.
GenerateLowerName will use the passed randomNameGenerator to generate a name with a lower sort value than all the passed names.
GetAPI gets the value of the CF_INT_API environment variable, if set, and prefixes it with "https://" if the value doesn't already start with "http".
GetAPIVersionV2 returns the V2 api version of the targeted API.
No description provided by the author
GetConfig loads a CF config JSON file and returns the parsed struct.
GetCredentials returns back the credentials for the user or client to authenticate with Cloud Foundry.
No description provided by the author
GetIsolationSegmentGUID gets the Isolation Segment GUID by passing along the given isolation segment name as a query parameter in the /v3/isolation_segments?names=name endpoint.
GetOrgGUID gets the GUID of an org with the given name.
No description provided by the author
GetSpaceGUID gets the GUID of a space with the given name.
ListUsers returns all the users in the targeted environment.
No description provided by the author
InstallConfigurablePlugin builds and installs a plugin called 'configurable_plugin' with the given name, version, and commands.
IsUAAVersionAtLeast returns true if the UAA version >= minVersion, false otherwise.
IsVersionMet verifies the targeted API meets the minimum required version.
No description provided by the author
LoginAs logs in to the CLI with 'cf auth' and the given username and password, retrying up to 3 times on failures.
LoginCF logs in to the CLI using the username and password from the CF_INT_USERNAME and CF_INT_PASSWORD environment variables, respectively, defaulting to "admin" for each if either is not set.
LoginCFWithClientCredentials logs in to the CLI using client credentials from the CF_INT_CLIENT_ID and CF_INT_CLIENT_SECRET environment variables and returns the client ID.
LogoutCF logs out of the CLI.
MakeBuildpackArchive makes a simple buildpack zip for a given stack.
ManagedServiceInstanceGUID returns the GUID for a managed service instance.
MapRouteToApplication maps a route to an app using 'cf map-route' and asserts that the mapping exists.
NewAppName provides a random name prefixed with INTEGRATION-APP.
NewBuildpackName provides a random name prefixed with INTEGRATION-BUILDPACK.
NewDomain constructs a new Domain with given owning organization and name.
NewDomainName provides a random domain name prefixed with integration.
NewHostName provides a random name prefixed with `host`.
NewIsolationSegmentName provides a random name prefixed with INTEGRATION-ISOLATION-SEGMENT.
NewOrgName provides a random name prefixed with INTEGRATION-ORG.
NewOrgQuotaName provides a random name prefixed with ORG-QUOTA.
NewPassword provides a random string prefixed with INTEGRATION-PASSWORD.
NewPath provides a random path prefixed with /PATH.
NewPlanName provides a random name prefixed with INTEGRATION-PLAN.
NewPluginRepositoryServer is used to configure and start a new plugin repo server, exposing the plugins contained in the pluginRepo.
NewPluginRepositoryServerWithPlugin is used to create a server to provide a single configurable_plugin with user provided name, version, and platform.
NewPluginRepositoryTLSServer is used to configure and start a new TLS plugin repo server, exposing the plugins contained in the pluginRepo.
NewRoute constructs a route with given space, domain, hostname, and path.
No description provided by the author
NewRouterGroupName provides a random name prefixed with INTEGRATION-ROUTER-GROUP.
NewSecurityGroup returns a new security group with the given attributes.
NewSecurityGroupName provides a random name prefixed with INTEGRATION-SEC-GROUP.
NewServiceBrokerName provides a random name prefixed with INTEGRATION-SERVICE-BROKER.
NewServiceInstanceName provides a random name prefixed with INT-SI.
NewServiceOfferingName provides a random name prefixed with INTEGRATION-SERVICE.
NewSpaceName provides a random name prefixed with INTEGRATION-SPACE.
NewStackName provides a random name prefixed with INTEGRATION-STACK.
NewTCPRoute constructs a TCP route with given space, domain, and port.
NewUsername provides a random name prefixed with INTEGRATION-USER.
ParseTokenString takes a string typed token and returns a jwt.JWT struct representation of that token.
ParseV3AppProcessTable parses bytes from 'cf app' stdout into an AppTable.
PluginPlatform returns the platform string for Unix.
PollLastOperationUntilSuccess polls the last operation performed on a service instance bound to a given app until success.
PreferredStack returns the cflinuxfs3 stack name if it present, otherwise cflinuxfs2 is returned.
PrefixedRandomName provides a random name with structure "namePrefix-randomstring".
QuickDeleteApp deletes the app with the given name, if provided, using 'cf curl /v3/app..
QuickDeleteOrg deletes the org with the given name, if provided, using 'cf curl /v2/organizations..
QuickDeleteOrgIfExists deletes the org with the given name, if it exists, using 'cf curl /v2/organizations..
QuickDeleteSpace deletes the space with the given name, if it exists, using 'cf curl /v2/spaces..
QuotaName provides a random name prefixed with INTEGRATION-QUOTA.
RandomName provides a random string.
RandomPort returns a port number that has not yet been used, starting at 1024 and increasing by one each time it is called.
SayPath is used to assert that a path is printed within streaming output.
SetAPI sets the API endpoint to the value of the CF_INT_API environment variable, or "https://api.bosh-lite.com" if not set.
SetConfig allows for a given function to modify a CF config JSON and writes the result back down to the filesystem.
SetConfigContent writes given raw config into given directory as "config.json".
SetHomeDir sets CF_HOME and CF_PLUGIN_HOME to a temp directory and outputs the created directory through GinkgoWriter.
SetOrgRole sets the org role with `cf set-org-role`.
SetSpaceRole sets the space role with `cf set-org-role`.
SetupBuildpackWithoutStack makes and uploads a buildpack without a stack.
SetupBuildpackWithStack makes and uploads a buildpack for the given stack.
SetupCF logs in to the CLI with LoginCF, creates the given org and space, and targets that org and space.
SetupCFWithGeneratedOrgAndSpaceNames logs in to the CLI with LoginCF, creates the org and space with generated names, and targets that org and space.
SetupCFWithOrgOnly logs in to the CLI with LoginCF, creates the given org, and targets it.
SetupReadOnlyOrgAndSpace creates a randomly-named org containing two randomly-named spaces.
SetupSynchronizedSuite runs a setup function in its own CF context, creating and destroying a home directory around it.
Sha1Sum calculates the SHA1 sum of a file.
SkipIfClientCredentialsNotSet will skip the test when either CF_INT_CLIENT_ID or CF_INT_CLIENT_SECRET are not set.
No description provided by the author
SkipIfCustomClientCredentialsNotSet will skip the test when either CF_INT_CUSTOM_CLIENT_ID or CF_INT_CUSTOM_CLIENT_SECRET are not set.
SkipIfNoRoutingAPI is used to skip tests if the routing API is not present.
SkipIfOIDCCredentialsNotSet returns back the username and the password for OIDC origin, or skips the test if those values are not set.
SkipIfPrivateDockerInfoNotSet skips the test if CF_INT_DOCKER_IMAGE, CF_INT_DOCKER_USERNAME, or CF_INT_DOCKER_PASSWORD environment variables are not defined.
SkipIfUAAVersionAtLeast is used to skip tests if the UAA varsion >= the specified version.
SkipIfUAAVersionLessThan is used to skip tests if the UAA version is < the specified version.
SkipIfV7 is used to skip tests if the target build is V7.
SkipIfV7AndVersionLessThan is used to skip tests if the target build is V7 and API version < the specified version If minVersion contains the prefix 3 then the v3 version is checked, otherwise the v2 version is used.
SkipIfVersionLessThan is used to skip tests if the the API version >= the specified version.
SkipIfVersionLessThan is used to skip tests if the the API version < the specified version.
No description provided by the author
No description provided by the author
StartAndTargetMockServerWithAPIVersions starts and targets a server with the given V2 and V3 API versions.
StartMockServerWithAPIVersions starts a server with the given V2 and V3 API versions.
StartMockServerWithAPIVersions starts a server with the given V2 and V3 API versions.
StartMockServerWithMinimumCLIVersion starts a server with the default V2 and V3 API versions and the given minimum CLI version.
SwitchToNoRole logs out of the CLI and logs back in as a newly-created user without a role.
SwitchToOrgRole logs out of the CLI and logs back in as a newly-created user with the given org role in the given org.
SwitchToSpaceRole logs out of the CLI and logs back in as a newly-created user with the given space role in the given space and org.
TargetOrg targets the given org with 'cf target'.
TargetOrgAndSpace targets the given org and space with 'cf target'.
TempDirAbsolutePath wraps `ioutil.TempDir`, ensuring symlinks are expanded before returning the path.
TempFileAbsolutePath wraps `ioutil.TempFile`, ensuring symlinks are expanded before returning the path.
TempFileWithContent writes a temp file with given content and return the file name.
TurnOffColors sets CF_COLOR to 'false'.
TurnOffExperimental unsets CF_CLI_EXPERIMENTAL.
TurnOnExperimental sets CF_CLI_EXPERIMENTAL to 'true'.
UnmapRouteFromApplication unmaps a route from an app using 'cf unmap-route' and asserts that the mapping gets deleted.
UnrefactoredCheckEnvironmentTargetedCorrectly will confirm if the command requires an API to be targeted and logged in to run.
UnsetAPI unsets the currently set API endpoint for the CLI.
UserProvidedServiceInstanceGUID returns the GUID for a user provided service instance.
VerifyAppPackageContentsV2 verifies the contents of a V2 app package by downloading the package zip and verifying the zipped files match the passed files.
VerifyAppPackageContentsV3 verifies the contents of a V3 app package by downloading the package zip and verifying the zipped files match the passed files.
WithBananaPantsApp creates a simple application to use with your CLI command (typically CF Push).
WithCrashingApp creates an application to use with your CLI command that will not successfully start its `web` process.
No description provided by the author
WithHelloWorldApp creates a simple application to use with your CLI command (typically CF Push).
WithMultiBuildpackApp creates a multi-buildpack application to use with the CF push command.
WithMultiEndpointApp creates a simple application to use with your CLI command (typically CF Push).
WithNoResourceMatchedApp creates a simple application to use with your CLI command (typically CF Push).
WithProcfileApp creates an application to use with your CLI command that contains Procfile defining web and worker processes.
WithRandomHomeDir sets CF_HOME and CF_PLUGIN_HOME to a temp directory and outputs the created directory through GinkgoWriter.
No description provided by the author
No description provided by the author
WriteCommand prints the working directory, the environment variables, and 'cf' with the given arguments.
WriteManifest will write out a YAML manifest file at the specified path.
Zipit zips the source into a .zip file in the target dir.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxTestPort should be defined by the CF router group for integration tests.
MinTestPort should be defined by the CF router group for integration tests.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

CcRootCache is a pointer to a cache of the CC root response.

# Structs

AppInstanceRow represents an instance of a V3 app's process, as displayed in the 'cf app' output.
AppProcessTable represents a process of a V3 app, as displayed in the 'cf app' output.
AppTable represents a V3 app as a collection of processes, as displayed in the 'cf app' output.
Binary represents the metadata need to retrieve one of the binaries that makes up a plugin.
No description provided by the author
BuildpackFields represents a buildpack, displayed in the 'cf buildpacks' command.
No description provided by the author
CFEnv represents configuration for running a 'cf' command.
Domain represents a domain scoped to an organization.
Plugin represents a plugin object provided by a plugin repo.
PluginCommand represents metadata for a CLI plugin command.
PluginRepository represents a repo response object describing a list of plugins available.
PluginRepositoryServerWithPlugin represents a server used to provide downloadable plugins.
Route represents a route.
No description provided by the author
ServiceInstanceGUID represents a service instance relationship.
UAAVersion a struct representation of the UAA version.
No description provided by the author

# Type aliases

No description provided by the author