package
3.16.1+incompatible
Repository: https://github.com/redhat-developer/odo.git
Documentation: pkg.go.dev

# Packages

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

# Functions

No description provided by the author
Chdir change current working dir.
No description provided by the author
No description provided by the author
No description provided by the author
CommonAfterEach is common function that cleans up after every test Spec (It).
CommonBeforeEach is common function runs before every test Spec (It) returns CommonVar values that are used within the test script.
CopyExample copies an example from tests/examples/<binaryOrSource>/<componentName>/<exampleName> into targetDir.
CopyExampleDevFile copies an example devfile from tests/examples/source/devfiles/<componentName>/devfile.yaml into targetDst.
No description provided by the author
CreateFileWithContent creates a file at the given path and writes the given content path is the path to the required file fileContent is the content to be written to the given file.
CreateFileWithContentAndPerm creates a file at the given path using the given file permissions, and writes the given content.
No description provided by the author
CreateLocalEnv creates a .odo/env/env.yaml file Useful for commands that require this file and cannot create one on their own, for e.g.
CreateNewContext create new empty temporary directory.
CreateRandProject create new project with random name (10 letters) without writing to the config file (without switching project).
CreateSimpleFile creates a simple file return the file path with random string.
DeleteDir deletes the specified path; due to Windows behaviour (for example https://github.com/redhat-developer/odo/issues/3371) where Windows temporarily holds a lock on files and folders, we keep trying to delete until the operation passes (or it expires).
DeleteFile deletes file.
No description provided by the author
DeleteProject deletes a specified project.
DontMatchAllInOutput ensures all strings are not in output.
EnableExperimentalMode enables the experimental mode, so that experimental features of odo can be used.
EnableTelemetryDebug creates a temp file to use for debugging telemetry.
No description provided by the author
ExtractK8sAndOcComponentsFromOutputOnPodman extracts the list of Kubernetes and OpenShift components from the "odo" output on Podman.
ExtractLines returns all lines of the given `output` string.
FileShouldContainSubstring check if file contains subString.
FileShouldNotContainSubstring check if file does not contain subString.
FindFirstElementIndexByPredicate returns the index of the first element in `slice` that satisfies the given `predicate`.
FindFirstElementIndexMatchingRegExp returns the index of the first element in `slice` that contains any match of the given regular expression `regularExpression`.
No description provided by the author
GenerateDelayedPodman returns a podman cmd that sleeps for delaySecond before responding; this function is usually used in combination with PODMAN_CMD_INIT_TIMEOUT odo preference.
GenerateProjectName generates a new projectName based on the name of the test file name (without path and replacing _ with -), line number of current ginkgo execution, and a random string of 3 letters.
GetAnnotationsDeployment gets the annotations from the deployment belonging to the given component, app and project.
GetCliRunner gets the running cli against Kubernetes or OpenShift.
GetCustomStartPort returns a port that can be used as starting value for custom port mapping.
No description provided by the author
No description provided by the author
GetEnvFromEntry returns envFrom entry of the deployment.
GetEnvRefNames gets the ref values from the envFroms of the deployment belonging to the given data.
No description provided by the author
No description provided by the author
GetMDXContent reads the content of MDX files, strips it of extra spaces and returns the string it strips the extra space for an easy comparison.
GetMetadataFromDevfile retrieves the metadata from devfile.
No description provided by the author
Returns version of installed podman.
GetPreferenceValue a global config value of given key or returns an empty string if value is not set.
GetSecrets gets all the secrets belonging to the project.
GetTelemetryDebugData gets telemetry data dumped into temp file for testing/debugging.
GetUserHomeDir gets the user home directory.
GetVersions returns the list of all versions for the given stack name in the given Devfile registry.
GetVolumeNamesFromDeployment gets the volumes from the deployment belonging to the given data.
Getwd returns current working dir.
HasAtLeastTwoVersions returns whether the given stack in the given Devfile registry has at least two versions.
HttpWaitForWithStatus periodically (every interval) calls GET to given url ends when result response contains match string and status code, or after the maxRetry.
No description provided by the author
IsJSON returns true if a string is in json format.
No description provided by the author
JsonPathContentContain expects that the content of the path to contain value.
No description provided by the author
JsonPathContentIs expects that the content of the path to equal value.
No description provided by the author
JsonPathDoesNotExist expects that the content of the path does not exist in the JSON string.
JsonPathExist expects that the content of the path exists in the JSON string.
JsonPathSatisfiesAll expects content of the path to satisfy all the matchers passed to it.
No description provided by the author
ListFilesInDir lists all the files in the directory directoryName is the name of the directory.
LocalKubeconfigSet sets the KUBECONFIG to the temporary config file.
MakeDir creates a new dir.
MatchAllInOutput ensures all strings are in output.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewKubectlRunner initializes new KubectlRunner.
NewOcRunner initializes new OcRunner.
No description provided by the author
No description provided by the author
No description provided by the author
RandString returns a random string of given length.
ReadFile reads the file from the filePath.
ReadRawDevfile parses and validates the Devfile specified and returns its raw content.
ReplaceAllForwardedPorts replaces the actual endpoints in cmd out with the ones in mdx out.
ReplaceAllTimeInString replaces the time taken to download a Devfile or a starter project for an odo command with a custom value; this function is helpful because the time value is variable and replacing it with the value in mdx content helps in comparing.
ReplaceRegistryUrl replaces the registry URL used for testing by a more static one.
ReplaceString replaces oldString with newString in text file.
ReplaceStrings replaces oldStrings with newStrings in text file two arrays must be of same length, else will fail.
ResetExperimentalMode disables the experimental mode.
ResetTelemetry resets the telemetry back to original values.
RunDevMode runs a dev session and executes the `inside` code when the dev mode is completely started The inside handler is passed the internal session pointer, the contents of the standard and error outputs, and a slice of strings - ports - giving the redirections in the form localhost:<port_number> to access ports opened by component.
RunInteractive runs the command in interactive mode and returns the output, and error.
RunTestSpecs defines a common way how test specs in test suite are executed.
RunWithExponentialBackoff keeps trying to run 'fxn' until it no longer returns an error; if the function never succeeded, then the most recent error is returned.
No description provided by the author
No description provided by the author
SetFsGroup is a DevfileUpdater which sets an attribute to a container to set a specific fsGroup for the container's pod.
StartDevMode starts a dev session with `odo dev` It returns a session structure, the contents of the standard and error outputs and the redirections endpoints to access ports opened by component when the dev mode is completely started.
StartLogsFollow starts a session with `odo logs --follow` It returns a session structure, the contents of the standard and error outputs.
StripAnsi strips the cmd out of ansi values used for fomatting(underline, colored line, etc.) the cmd out; this function should be called before StripSpinner for better results and is essential because mdx content does not support ansi The regex used by this function is copied from https://github.com/acarl005/stripansi/.
StripGitCommitFromVersion removes any git commit hash from the full odo version string.
StripInteractiveQuestion strips the extra output from interactive questions, leaving the final output e.g.
StripSpinner strips the cmd out string of spaces, spinner statements and spinner frames.
Unindented returns the unindented version of the jsonStr passed to it.
UpdateDevfileContent parses the Devfile at the given path, then updates its content using the given handlers, and writes the updated Devfile to the given path.
VerifyContainerSyncEnv verifies the sync env in the container.
VerifyFileExists receives a path to a file, and returns whether or not it points to an existing file.
WaitAndCheckForTerminatingState waits for the given interval and checks if the given resource type has been deleted on the cluster or is in the terminating state path is the path to the program's binary.
WaitAppReadyInContainer probes the remote container using the specified command (cmd).
WaitForCmdOut runs a command until it gets the expected output.
WaitForDevModeToContain runs `odo dev` until it contains a given substring in output or errOut(depending on checkErrOut arg).
WaitForErroutToContain waits for the session stdout output to contain a particular substring if the session exits, it checks for the substring and returns early.
WaitForOutputToContain waits for the session stdout output to contain a particular substring; if the session exits, it checks for the substring and returns early.
No description provided by the author

# 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
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

DevfileCommandGroupUpdater updates the group definition of the specified command.
DevfileMetadataNameRemover removes the 'metadata.name' field from the given Devfile.
DevfileMetadataNameSetter sets the 'metadata.name' field into the given Devfile.

# Structs

ClusterComponent is an abstraction for a Devfile Component deployed on a cluster (either Kubernetes or OpenShift).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InteractiveContext represents the context of an interactive command to be run.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PodmanComponent is an abstraction for a Devfile Component deployed on podman.
No description provided by the author
No description provided by the author

# Interfaces

CliRunner requires functions which are common for oc and kubectl By abstracting these functions into an interface, it handles the cli runner and calls the functions specified to particular cluster only.
Component is an abstraction for a Devfile Component deployed on a specific platform.
No description provided by the author

# Type aliases

DevfileUpdater is a helper type that can mutate a Devfile object.
Tester represents the function that contains all steps to test the given interactive command.