package
1.2.6
Repository: https://github.com/redhat-developer/ocdev.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

Chdir change current working dir.
No description provided by the author
CmdShouldFail returns stderr if command fails.
CmdShouldFailWithRetry runs a command and checks if it fails, if it doesn't then it retries.
CmdShouldPass returns stdout if command succeeds.
CmdShouldRunAndTerminate waits and returns stdout after a closed signal is passed on the closed channel.
CmdShouldRunWithTimeout waits for a certain duration and then returns stdout.
CopyExample copies an example from tests/e2e/examples/<exampleName> into targetDir.
CopyExampleDevFile copies an example devfile from tests/e2e/examples/<exampleName>/devfile.yaml into targetDst.
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.
CreateNewContext create new empty temporary directory.
CreateRandProject create new project with random name (10 letters) without writing to the config file (without switching project).
CreateSymLink creates a symlink between the oldFile and the newFile.
DeleteDir deletes the specified path; due to Windows behaviour (for example https://github.com/openshift/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.
DeleteProject deletes a specified project.
DetermineRouteURL takes context path as argument and returns the http URL where the current component exposes it's service this URL can then be used in order to interact with the deployed service running in Openshift.
DontMatchAllInOutput ensures all strings are not in output.
ExtractSubString extracts substring from output, beginning at start and before end.
FileIsEmpty checks if the file is empty.
FileShouldContainSubstring check if file contains subString.
GetCliRunner gets the running cli against Kubernetes or OpenShift.
GetConfigValue returns a local config value of given key or returns an empty string if value is not set.
GetConfigValueWithContext returns a local config value of given key and contextdir or returns an empty string if value is not set.
GetPreferenceValue a global config value of given key or returns an empty string if value is not set.
GetUserHomeDir gets the user home directory.
Getwd retruns current working dir.
HttpFileServer starts a http server with a file handler on the free port provided the file handler uses the location provided for serving the requests.
HttpWaitFor periodically (every interval) calls GET to given url ends when a 200 HTTP result response contains match string, or after the maxRetry.
HttpWaitForWithStatus periodically (every interval) calls GET to given url ends when result response contains match string and status code, or after the maxRetry.
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.
NewDockerRunner initializes new DockerRunner.
NewKubectlRunner initializes new KubectlRunner.
NewOcRunner initializes new OcRunner.
RandString returns a random string of given length.
ReadFile reads the file from the filePath.
RenameFile renames a file from oldFileName to newFileName.
ReplaceDevfileField replaces the value of a given field in a specified devfile.
ReplaceString replaces oldString with newString in text file.
RunCmdWithMatchOutputFromBuffer starts the command, and command stdout is attached to buffer.
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.
Search for the item in cmpfield string array.
Suffocate the string by removing all the space from it ;-).
Unindented returns the unindented version of the jsonStr passed to it.
ValidateLocalCmpExist verifies the local config parameter It takes context and fieldType,value string as args URL and Storage parameter takes key,indexnumber,fieldType,value as args.
VerifyFileExists recieves a path to a file, and returns whether or not it points to an existing file.
VerifyFilesExist recieves an array of paths to files, and returns whether or not they all exist.
WaitForCmdOut runs a command until it gets the expected output.
WaitForOutputToContain waits for for the session stdout output to contain a particular substring.
WatchNonRetCmdStdOut runs an 'odo watch' command and stores the process' stdout output into buffer.

# Structs

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

# Interfaces

CliRunner requires functions which are common for oc, kubectl and docker By abstracting these functions into an interface, it handles the cli runner and calls the functions specified to particular cluster only.