/
helper_cli.go
21 lines (19 loc) · 1.15 KB
/
helper_cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package helper
import "github.com/onsi/gomega/gexec"
// 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
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
}