Documentation ¶
Index ¶
- func Chdir(dir string)
- func CmdRunner(program string, args ...string) *gexec.Session
- func CmdShouldFail(program string, args ...string) string
- func CmdShouldFailWithRetry(maxRetry, intervalSeconds int, program string, args ...string) string
- func CmdShouldPass(program string, args ...string) string
- func CmdShouldRunAndTerminate(timeoutAfter time.Duration, stopChan <-chan bool, program string, ...) string
- func CmdShouldRunWithTimeout(timeout time.Duration, program string, args ...string) string
- func CopyExample(exampleName string, targetDir string)
- func CopyExampleDevFile(devfilePath, targetDst string)
- func CreateFileWithContent(path string, fileContent string) error
- func CreateNewContext() string
- func CreateRandProject() string
- func CreateSymLink(oldFileName, newFileName string)
- func DeleteDir(dir string)
- func DeleteFile(filepath string)
- func DeleteProject(projectName string)
- func DetermineRouteURL(context string) string
- func DontMatchAllInOutput(output string, tonotmatch []string)
- func ExtractSubString(output, start, end string) string
- func FileIsEmpty(filename string) (bool, error)
- func FileShouldContainSubstring(file string, subString string)
- func GetConfigValue(key string) string
- func GetConfigValueWithContext(key string, context string) string
- func GetPreferenceValue(key string) string
- func GetUserHomeDir() string
- func Getwd() string
- func HttpFileServer(port int, location string) *http.Server
- func HttpWaitFor(url string, match string, maxRetry int, interval int)
- func HttpWaitForWithStatus(url string, match string, maxRetry int, interval int, expectedCode int)
- func ListFilesInDir(directoryName string) []string
- func LocalKubeconfigSet(context string)
- func MakeDir(dir string)
- func MatchAllInOutput(output string, tomatch []string)
- func RandString(n int) string
- func ReadFile(filePath string) (string, error)
- func RenameFile(oldFileName, newFileName string)
- func ReplaceDevfileField(devfileLocation, field, newValue string) error
- func ReplaceString(filename string, oldString string, newString string)
- func RunCmdWithMatchOutputFromBuffer(timeoutAfter time.Duration, matchString, program string, args ...string) (bool, error)
- func RunWithExponentialBackoff(fxn func() error, maxDelayInSeconds int, expireDuration time.Duration) error
- func Search(cmpField []string, val string) bool
- func Suffocate(s string) string
- func Unindented(jsonStr string) (string, error)
- func ValidateLocalCmpExist(context string, args ...string)
- func VerifyFileExists(filename string) bool
- func VerifyFilesExist(path string, files []string) bool
- func WaitForCmdOut(program string, args []string, timeout int, errOnFail bool, ...) bool
- func WaitForOutputToContain(substring string, timeoutInSeconds int, intervalInSeconds int, ...)
- func WatchNonRetCmdStdOut(cmdStr string, timeout time.Duration, success func(output string) bool, ...) (bool, error)
- type CliRunner
- type DockerRunner
- func (d *DockerRunner) CreateVolume(volumeName string, labels []string)
- func (d *DockerRunner) ExecContainer(containerID, command string) string
- func (d *DockerRunner) GetEnvsDevFileDeployment(containerID, command string) map[string]string
- func (d *DockerRunner) GetRunningContainersByCompAlias(comp string, alias string) []string
- func (d *DockerRunner) GetRunningContainersByLabel(label string) []string
- func (d *DockerRunner) GetSourceAndStorageVolumesByComponent(componentLabel string) []string
- func (d *DockerRunner) GetVolumesByCompStorageName(component string, storageName string) []string
- func (d *DockerRunner) GetVolumesByLabel(label string) []string
- func (d *DockerRunner) InspectVolume(volumeName string) []map[string]interface{}
- func (d *DockerRunner) IsVolumeMountedInContainer(volumeName string, component string, alias string) bool
- func (d *DockerRunner) ListRunningContainers() string
- func (d *DockerRunner) ListVolumes() []string
- func (d *DockerRunner) RemoveVolumeByName(volumeName string) *gexec.Session
- func (d *DockerRunner) RemoveVolumesByComponent(componentLabel string) string
- func (d *DockerRunner) Run(cmd string) *gexec.Session
- func (d *DockerRunner) StopContainers(label string)
- func (d *DockerRunner) VolumeExists(name string) bool
- type KubectlRunner
- func (kubectl KubectlRunner) CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, ...) bool
- func (kubectl KubectlRunner) CreateRandNamespaceProject() string
- func (kubectl KubectlRunner) DeleteNamespaceProject(projectName string)
- func (kubectl KubectlRunner) Exec(podName string, projectName string, args ...string) string
- func (kubectl KubectlRunner) ExecListDir(podName string, projectName string, dir string) string
- func (kubectl KubectlRunner) GetAllPVCNames(namespace string) []string
- func (kubectl KubectlRunner) GetEnvsDevFileDeployment(componentName string, projectName string) map[string]string
- func (kubectl KubectlRunner) GetPVCSize(compName, storageName, namespace string) string
- func (kubectl KubectlRunner) GetRunningPodNameByComponent(compName string, namespace string) string
- func (kubectl KubectlRunner) GetServices(namespace string) string
- func (kubectl KubectlRunner) GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
- func (kubectl KubectlRunner) Run(cmd string) *gexec.Session
- func (kubectl KubectlRunner) WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool
- type OcRunner
- func (oc OcRunner) CheckCmdOpInRemoteCmpPod(cmpName string, appName string, prjName string, cmd []string, ...) bool
- func (oc OcRunner) CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, ...) bool
- func (oc OcRunner) CreateRandNamespaceProject() string
- func (oc OcRunner) DeleteNamespaceProject(projectName string)
- func (oc OcRunner) DescribeDc(dcName string, namespace string) string
- func (oc OcRunner) EnvVarTest(resourceName string, sourceType string, envString string)
- func (oc OcRunner) Exec(podName string, projectName string, args ...string) string
- func (oc OcRunner) ExecListDir(podName string, projectName string, dir string) string
- func (oc OcRunner) GetAllPVCNames(namespace string) []string
- func (oc OcRunner) GetComponentDC(component string, app string, project string) string
- func (oc OcRunner) GetComponentRoutes(component string, app string, project string) string
- func (oc OcRunner) GetCurrentProject() string
- func (oc OcRunner) GetCurrentServerURL() string
- func (oc OcRunner) GetDcName(compName string, namespace string) string
- func (oc OcRunner) GetDcPorts(componentName string, appName string, project string) string
- func (oc OcRunner) GetEnvFromEntry(componentName string, appName string, projectName string) string
- func (oc OcRunner) GetEnvs(componentName string, appName string, projectName string) map[string]string
- func (oc OcRunner) GetEnvsDevFileDeployment(componentName string, projectName string) map[string]string
- func (oc OcRunner) GetFirstURL(component string, app string, project string) string
- func (oc OcRunner) GetLoginUser() string
- func (oc OcRunner) GetPVCSize(compName, storageName, namespace string) string
- func (oc OcRunner) GetRoute(urlName string, appName string) string
- func (oc OcRunner) GetRunningPodNameByComponent(compName string, namespace string) string
- func (oc OcRunner) GetRunningPodNameOfComp(compName string, namespace string) string
- func (oc OcRunner) GetServices(namespace string) string
- func (oc OcRunner) GetToken() string
- func (oc OcRunner) GetVolumeMountName(dcName string, namespace string) string
- func (oc OcRunner) GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
- func (oc OcRunner) GetVolumeMountPath(dcName string, namespace string) string
- func (oc OcRunner) ImportDotnet20IS(project string)
- func (oc OcRunner) ImportImageFromRegistry(registry, image, cmpType, project string)
- func (oc OcRunner) ImportJavaIS(project string)
- func (oc OcRunner) LoginUsingToken(token string) string
- func (oc OcRunner) MaxCPU(componentName string, appName string, project string) string
- func (oc OcRunner) MaxMemory(componentName string, appName string, project string) string
- func (oc OcRunner) MinCPU(componentName string, appName string, project string) string
- func (oc OcRunner) MinMemory(componentName string, appName string, project string) string
- func (oc OcRunner) Run(cmd string) *gexec.Session
- func (oc OcRunner) ServiceInstanceStatus(serviceInstanceName string) string
- func (oc OcRunner) SourceLocationBC(componentName string, appName string, project string) string
- func (oc OcRunner) SourceLocationDC(componentName string, appName string, project string) string
- func (oc OcRunner) SourceTest(appTestName string, sourceType string, source string)
- func (oc OcRunner) SourceTypeBC(componentName string, appName string, project string) string
- func (oc OcRunner) SourceTypeDC(componentName string, appName string, project string) string
- func (oc OcRunner) SwitchProject(projectName string)
- func (oc OcRunner) VerifyAppNameOfComponent(cmpName string, appName string, namespace string)
- func (oc OcRunner) VerifyCmpExists(cmpName string, appName string, prjName string)
- func (oc OcRunner) VerifyCmpName(cmpName string, namespace string)
- func (oc OcRunner) VerifyLabelExistsOfComponent(cmpName string, namespace string, labelName string)
- func (oc OcRunner) VerifyResourceDeleted(resourceType, resourceName, namespace string)
- func (oc OcRunner) WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool
- func (oc OcRunner) WaitForDCRollout(dcName string, project string, timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdShouldFail ¶
CmdShouldFail returns stderr if command fails
func CmdShouldFailWithRetry ¶
CmdShouldFailWithRetry runs a command and checks if it fails, if it doesn't then it retries
func CmdShouldPass ¶
CmdShouldPass returns stdout if command succeeds
func CmdShouldRunAndTerminate ¶
func CmdShouldRunAndTerminate(timeoutAfter time.Duration, stopChan <-chan bool, program string, args ...string) string
CmdShouldRunAndTerminate waits and returns stdout after a closed signal is passed on the closed channel
func CmdShouldRunWithTimeout ¶
CmdShouldRunWithTimeout waits for a certain duration and then returns stdout
func CopyExample ¶
CopyExample copies an example from tests/e2e/examples/<exampleName> into targetDir
func CopyExampleDevFile ¶
func CopyExampleDevFile(devfilePath, targetDst string)
CopyExampleDevFile copies an example devfile from tests/e2e/examples/<exampleName>/devfile.yaml into targetDst
func CreateFileWithContent ¶
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
func CreateNewContext ¶
func CreateNewContext() string
CreateNewContext create new empty temporary directory
func CreateRandProject ¶
func CreateRandProject() string
CreateRandProject create new project with random name (10 letters) without writing to the config file (without switching project)
func CreateSymLink ¶
func CreateSymLink(oldFileName, newFileName string)
CreateSymLink creates a symlink between the oldFile and the newFile
func DeleteDir ¶
func DeleteDir(dir string)
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)
func DeleteProject ¶
func DeleteProject(projectName string)
DeleteProject deletes a specified project
func DetermineRouteURL ¶
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
func DontMatchAllInOutput ¶
DontMatchAllInOutput ensures all strings are not in output
func ExtractSubString ¶
ExtractSubString extracts substring from output, beginning at start and before end
func FileIsEmpty ¶
FileIsEmpty checks if the file is empty
func FileShouldContainSubstring ¶
FileShouldContainSubstring check if file contains subString
func GetConfigValue ¶
GetConfigValue returns a local config value of given key or returns an empty string if value is not set
func GetConfigValueWithContext ¶
GetConfigValueWithContext returns a local config value of given key and contextdir or returns an empty string if value is not set
func GetPreferenceValue ¶
GetPreferenceValue a global config value of given key or returns an empty string if value is not set
func HttpFileServer ¶
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
func HttpWaitFor ¶
HttpWaitFor periodically (every interval) calls GET to given url ends when a 200 HTTP result response contains match string, or after the maxRetry
func HttpWaitForWithStatus ¶
HttpWaitForWithStatus periodically (every interval) calls GET to given url ends when result response contains match string and status code, or after the maxRetry
func ListFilesInDir ¶
ListFilesInDir lists all the files in the directory directoryName is the name of the directory
func LocalKubeconfigSet ¶
func LocalKubeconfigSet(context string)
LocalKubeconfigSet sets the KUBECONFIG to the temporary config file
func MatchAllInOutput ¶
MatchAllInOutput ensures all strings are in output
func RenameFile ¶
func RenameFile(oldFileName, newFileName string)
RenameFile renames a file from oldFileName to newFileName
func ReplaceDevfileField ¶
ReplaceDevfileField replaces the value of a given field in a specified devfile. Currently only the first match of the field is replaced. i.e if the field is 'type' and there are two types throughout the devfile, only one is replaced with the newValue
func ReplaceString ¶
ReplaceString replaces oldString with newString in text file
func RunCmdWithMatchOutputFromBuffer ¶
func RunCmdWithMatchOutputFromBuffer(timeoutAfter time.Duration, matchString, program string, args ...string) (bool, error)
RunCmdWithMatchOutputFromBuffer starts the command, and command stdout is attached to buffer. we read data from buffer line by line, and if expected string is matched it returns true It is different from WaitforCmdOut which gives stdout in one go using session.Out.Contents() for commands like odo log -f which streams continuous data and does not terminate by their own we need to read the stream data from buffer.
func RunWithExponentialBackoff ¶
func RunWithExponentialBackoff(fxn func() error, maxDelayInSeconds int, expireDuration time.Duration) error
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.
func Unindented ¶
Unindented returns the unindented version of the jsonStr passed to it
func ValidateLocalCmpExist ¶
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
func VerifyFileExists ¶
VerifyFileExists recieves a path to a file, and returns whether or not it points to an existing file
func VerifyFilesExist ¶
VerifyFilesExist recieves an array of paths to files, and returns whether or not they all exist. If any one of the expected files doesn't exist, it returns false
func WaitForCmdOut ¶
func WaitForCmdOut(program string, args []string, timeout int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool
WaitForCmdOut runs a command until it gets the expected output. It accepts 5 arguments, program (program to be run) args (arguments to the program) timeout (the time to wait for the output) errOnFail (flag to set if test should fail if command fails) check (function with output check logic) It times out if the command doesn't fetch the expected output within the timeout period.
func WaitForOutputToContain ¶
func WaitForOutputToContain(substring string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)
WaitForOutputToContain waits for for the session stdout output to contain a particular substring
func WatchNonRetCmdStdOut ¶
func WatchNonRetCmdStdOut(cmdStr string, timeout time.Duration, success func(output string) bool, startSimulationCh chan bool, startIndicatorFunc func(output string) bool) (bool, error)
WatchNonRetCmdStdOut runs an 'odo watch' command and stores the process' stdout output into buffer. - startIndicatorFunc should check stdout output and return true when simulation is ready to begin (for example, buffer contains "Waiting for something to change") - startSimulationCh will be sent a 'true' when startIndicationFunc first returns true, at which point files/directories should be created by associated goroutine - success function is passed stdout buffer, and should return if the test conditions have passes
Types ¶
type CliRunner ¶
type CliRunner interface { Run(cmd string) *gexec.Session ExecListDir(podName string, projectName string, dir string) string Exec(podName string, projectName string, args ...string) string CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool GetRunningPodNameByComponent(compName string, namespace string) string GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool GetServices(namespace string) string CreateRandNamespaceProject() string DeleteNamespaceProject(projectName string) GetEnvsDevFileDeployment(componentName string, projectName string) map[string]string GetPVCSize(compName, storageName, namespace string) string GetAllPVCNames(namespace string) []string }
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
func GetCliRunner ¶
func GetCliRunner() CliRunner
GetCliRunner gets the running cli against Kubernetes or OpenShift
type DockerRunner ¶
type DockerRunner struct {
// contains filtered or unexported fields
}
func NewDockerRunner ¶
func NewDockerRunner(dockerPath string) DockerRunner
NewDockerRunner initializes new DockerRunner
func (*DockerRunner) CreateVolume ¶
func (d *DockerRunner) CreateVolume(volumeName string, labels []string)
CreateVolume creates an empty volume with the given name and labels
func (*DockerRunner) ExecContainer ¶
func (d *DockerRunner) ExecContainer(containerID, command string) string
ExecContainer returns output after exec the command in the container
func (*DockerRunner) GetEnvsDevFileDeployment ¶
func (d *DockerRunner) GetEnvsDevFileDeployment(containerID, command string) map[string]string
func (*DockerRunner) GetRunningContainersByCompAlias ¶
func (d *DockerRunner) GetRunningContainersByCompAlias(comp string, alias string) []string
GetRunningContainersByCompAlias returns the list of containers labeled with the specified component and alias
func (*DockerRunner) GetRunningContainersByLabel ¶
func (d *DockerRunner) GetRunningContainersByLabel(label string) []string
GetRunningContainersByLabel lists all running images with the label (of the form "key=value")
func (*DockerRunner) GetSourceAndStorageVolumesByComponent ¶
func (d *DockerRunner) GetSourceAndStorageVolumesByComponent(componentLabel string) []string
GetSourceAndStorageVolumesByComponent lists only the volumes that are associated with this component and contain either the 'type' or 'storage-name' fields.
func (*DockerRunner) GetVolumesByCompStorageName ¶
func (d *DockerRunner) GetVolumesByCompStorageName(component string, storageName string) []string
GetVolumesByCompStorageName returns the list of volumes associated with a specific devfile volume in a component
func (*DockerRunner) GetVolumesByLabel ¶
func (d *DockerRunner) GetVolumesByLabel(label string) []string
GetVolumesByLabel returns a list of volumes with the label (of the form "key=value")
func (*DockerRunner) InspectVolume ¶
func (d *DockerRunner) InspectVolume(volumeName string) []map[string]interface{}
InspectVolume returns a map-representation of the JSON returned by the 'docker inspect volume' command
func (*DockerRunner) IsVolumeMountedInContainer ¶
func (d *DockerRunner) IsVolumeMountedInContainer(volumeName string, component string, alias string) bool
IsVolumeMountedInContainer returns true if the specified volume is mounted in the container associated with specified component and alias
func (*DockerRunner) ListRunningContainers ¶
func (d *DockerRunner) ListRunningContainers() string
ListRunningContainers runs 'docker ps' to list all running images
func (*DockerRunner) ListVolumes ¶
func (d *DockerRunner) ListVolumes() []string
ListVolumes lists all volumes on the cluster
func (*DockerRunner) RemoveVolumeByName ¶
func (d *DockerRunner) RemoveVolumeByName(volumeName string) *gexec.Session
RemoveVolumeByName removes a specific volume by name
func (*DockerRunner) RemoveVolumesByComponent ¶
func (d *DockerRunner) RemoveVolumesByComponent(componentLabel string) string
RemoveVolumesByComponent removes source/storage volumes that match specified component
func (*DockerRunner) Run ¶
func (d *DockerRunner) Run(cmd string) *gexec.Session
Run docker with given arguments
func (*DockerRunner) StopContainers ¶
func (d *DockerRunner) StopContainers(label string)
StopContainers kills and stops all running containers with the specified label (such as component=nodejs)
func (*DockerRunner) VolumeExists ¶
func (d *DockerRunner) VolumeExists(name string) bool
VolumeExists returns true if a volume with the given name exists, false otherwise.
type KubectlRunner ¶
type KubectlRunner struct {
// contains filtered or unexported fields
}
func NewKubectlRunner ¶
func NewKubectlRunner(kubectlPath string) KubectlRunner
NewKubectlRunner initializes new KubectlRunner
func (KubectlRunner) CheckCmdOpInRemoteDevfilePod ¶
func (kubectl KubectlRunner) CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool
CheckCmdOpInRemoteDevfilePod runs the provided command on remote component pod and returns the return value of command output handler function passed to it
func (KubectlRunner) CreateRandNamespaceProject ¶
func (kubectl KubectlRunner) CreateRandNamespaceProject() string
CreateRandNamespaceProject create new project with random name in kubernetes cluster (10 letters)
func (KubectlRunner) DeleteNamespaceProject ¶
func (kubectl KubectlRunner) DeleteNamespaceProject(projectName string)
DeleteNamespaceProject deletes a specified project in kubernetes cluster
func (KubectlRunner) Exec ¶
func (kubectl KubectlRunner) Exec(podName string, projectName string, args ...string) string
Exec allows generic execution of commands, returning the contents of stdout
func (KubectlRunner) ExecListDir ¶
func (kubectl KubectlRunner) ExecListDir(podName string, projectName string, dir string) string
ExecListDir returns dir list in specified location of pod
func (KubectlRunner) GetAllPVCNames ¶
func (kubectl KubectlRunner) GetAllPVCNames(namespace string) []string
func (KubectlRunner) GetEnvsDevFileDeployment ¶
func (kubectl KubectlRunner) GetEnvsDevFileDeployment(componentName string, projectName string) map[string]string
func (KubectlRunner) GetPVCSize ¶
func (kubectl KubectlRunner) GetPVCSize(compName, storageName, namespace string) string
GetPVCSize executes kubectl command and returns the bound storage size
func (KubectlRunner) GetRunningPodNameByComponent ¶
func (kubectl KubectlRunner) GetRunningPodNameByComponent(compName string, namespace string) string
GetRunningPodNameByComponent executes kubectl command and returns the running pod name of a delopyed devfile component by passing component name as a argument
func (KubectlRunner) GetServices ¶
func (kubectl KubectlRunner) GetServices(namespace string) string
GetServices gets services on the cluster
func (KubectlRunner) GetVolumeMountNamesandPathsFromContainer ¶
func (kubectl KubectlRunner) GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
GetVolumeMountNamesandPathsFromContainer returns the volume name and mount path in the format name:path\n
func (KubectlRunner) Run ¶
func (kubectl KubectlRunner) Run(cmd string) *gexec.Session
Run kubectl with given arguments
func (KubectlRunner) WaitAndCheckForExistence ¶
func (kubectl KubectlRunner) WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool
WaitAndCheckForExistence wait for the given and checks if the given resource type gets deleted on the cluster
type OcRunner ¶
type OcRunner struct {
// contains filtered or unexported fields
}
func (OcRunner) CheckCmdOpInRemoteCmpPod ¶
func (oc OcRunner) CheckCmdOpInRemoteCmpPod(cmpName string, appName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool
CheckCmdOpInRemoteCmpPod runs the provided command on remote component pod and returns the return value of command output handler function passed to it
func (OcRunner) CheckCmdOpInRemoteDevfilePod ¶
func (oc OcRunner) CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool
CheckCmdOpInRemoteDevfilePod runs the provided command on remote component pod and returns the return value of command output handler function passed to it
func (OcRunner) CreateRandNamespaceProject ¶
CreateRandNamespaceProject create new project with random name in oc cluster (10 letters)
func (OcRunner) DeleteNamespaceProject ¶
DeleteNamespaceProject deletes a specified project in oc cluster
func (OcRunner) DescribeDc ¶
DescribeDc execute oc command and returns dc describe as a string by passing dcname and namespace as arguments
func (OcRunner) EnvVarTest ¶
EnvVarTest checks the component container env vars in the build config for git and deployment config for git/binary/local appTestName is the app of the app sourceType is the type of the source of the component i.e git/binary/local
func (OcRunner) ExecListDir ¶
ExecListDir returns dir list in specified location of pod
func (OcRunner) GetAllPVCNames ¶
func (OcRunner) GetComponentDC ¶
GetComponentDC run command to get the DeploymentConfig in yaml format for given component
func (OcRunner) GetComponentRoutes ¶
GetComponentRoutes run command to get the Routes in yaml format for given component
func (OcRunner) GetCurrentProject ¶
GetCurrentProject get currently active project in oc returns empty string if there no active project, or no access to the project
func (OcRunner) GetCurrentServerURL ¶
GetCurrentServerURL retrieves the URL of the server we're currently connected to returns empty if not connected or an error occurred
func (OcRunner) GetDcName ¶
GetDcName execute oc command and returns dc name of a delopyed component by passing component name as a argument
func (OcRunner) GetDcPorts ¶
GetDcPorts returns the ports of the component
func (OcRunner) GetEnvFromEntry ¶
GetEnvFromEntry returns envFrom entry
func (OcRunner) GetEnvs ¶
func (oc OcRunner) GetEnvs(componentName string, appName string, projectName string) map[string]string
GetEnvs returns all env variables in deployment config
func (OcRunner) GetEnvsDevFileDeployment ¶
func (OcRunner) GetFirstURL ¶
GetFirstURL returns the url of the first Route that it can find for given component
func (OcRunner) GetLoginUser ¶
GetLoginUser returns current user name
func (OcRunner) GetPVCSize ¶
GetPVCSize executes oc command and returns the bound storage size
func (OcRunner) GetRunningPodNameByComponent ¶
GetRunningPodNameByComponent executes oc command and returns the running pod name of a delopyed devfile component by passing component name as a argument
func (OcRunner) GetRunningPodNameOfComp ¶
GetRunningPodNameOfComp executes oc command and returns the running pod name of a delopyed component by passing component name as a argument
func (OcRunner) GetServices ¶
GetServices gets services on the cluster
func (OcRunner) GetVolumeMountName ¶
GetVolumeMountName returns the name of the volume
func (OcRunner) GetVolumeMountNamesandPathsFromContainer ¶
func (oc OcRunner) GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
GetVolumeMountNamesandPathsFromContainer returns the volume name and mount path in the format name:path\n
func (OcRunner) GetVolumeMountPath ¶
GetVolumeMountPath returns the path of the volume mount
func (OcRunner) ImportDotnet20IS ¶
ImportDotnet20IS import the dotnet image
func (OcRunner) ImportImageFromRegistry ¶
ImportImageFromRegistry import the required image of the respective component type from the specified registry
func (OcRunner) ImportJavaIS ¶
ImportJavaIS import the openjdk image which is used for jars
func (OcRunner) LoginUsingToken ¶
LoginUsingToken returns output after successful login
func (OcRunner) ServiceInstanceStatus ¶
ServiceInstanceStatus returns service instance
func (OcRunner) SourceLocationBC ¶
SourceLocationBC returns the source location from the build config
func (OcRunner) SourceLocationDC ¶
SourceLocationDC returns the source location from the deployment config
func (OcRunner) SourceTest ¶
SourceTest checks the component-source-type and the source url in the annotation of the bc and dc appTestName is the name of the app sourceType is the type of the source of the component i.e git/binary/local source is the source of the component i.e gitURL or path to the directory or binary file
func (OcRunner) SourceTypeBC ¶
SourceTypeBC returns the source type from the build config
func (OcRunner) SourceTypeDC ¶
SourceTypeDC returns the source type from the deployment config
func (OcRunner) SwitchProject ¶
SwitchProject switch to the project
func (OcRunner) VerifyAppNameOfComponent ¶
VerifyAppNameOfComponent verifies app name of component
func (OcRunner) VerifyCmpExists ¶
VerifyCmpExists verifies if component was created successfully
func (OcRunner) VerifyCmpName ¶
VerifyCmpName verifies the component name
func (OcRunner) VerifyLabelExistsOfComponent ¶
VerifyLabelExistsOfComponent verifies app name of component
func (OcRunner) VerifyResourceDeleted ¶
VerifyResourceDeleted verifies if the given resource is deleted from cluster