-
Notifications
You must be signed in to change notification settings - Fork 244
/
helper_cli.go
17 lines (15 loc) · 922 Bytes
/
helper_cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
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)
}