helper

package
v1.0.0-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chdir

func Chdir(dir string)

Chdir change current working dir

func CmdRunner

func CmdRunner(program string, args ...string) *gexec.Session

func CmdShouldFail

func CmdShouldFail(program string, args ...string) string

func CmdShouldPass

func CmdShouldPass(program string, args ...string) string

func CopyExample

func CopyExample(exampleName string, targetDir string)

CopyExample copies an example from tests/e2e/examples/<exampleName> into targetDir

func CreateNewContext

func CreateNewContext() string

CreateNewContext create new empty temporary directory

func DeleteDir

func DeleteDir(dir string)

DeleteDir delete directory

func FileShouldContainSubstring

func FileShouldContainSubstring(file string, subString string)

FileShouldContainSubstring check if file contains subString

func Getwd

func Getwd() string

Getwd retruns current working dir

func HttpWaitFor

func HttpWaitFor(url string, match string, maxRetry int, interval int)

HttpWaitFor periodically (every interval) calls GET to given url ends when result response contains match string, or after the maxRetry

Types

type OcRunner

type OcRunner struct {
	// contains filtered or unexported fields
}

func NewOcRunner

func NewOcRunner(ocPath string) OcRunner

New initializes new OcRunner

func (*OcRunner) CreateRandProject

func (oc *OcRunner) CreateRandProject() string

CreateRandProject create new project with random name (10 letters) without writing to the config file (without switching project)

func (*OcRunner) DeleteProject

func (oc *OcRunner) DeleteProject(projectName string)

DeleteProject deletes a specified project

func (*OcRunner) GetComponentDC

func (oc *OcRunner) GetComponentDC(component string, app string, project string) string

GetComponentDC run command to get the DeploymentConfig in yaml format for given component

func (*OcRunner) GetComponentRoutes

func (oc *OcRunner) GetComponentRoutes(component string, app string, project string) string

GetComponentRoute run command to get the Routes in yaml format for given component

func (*OcRunner) GetCurrentProject

func (oc *OcRunner) GetCurrentProject() string

GetCurrentProject get currently active project in oc returns empty string if there no active project, or no access to the project

func (*OcRunner) GetFirstURL

func (oc *OcRunner) GetFirstURL(component string, app string, project string) string

GetFirstURL returns the url of the first Route that it can find for given component

func (*OcRunner) Run

func (oc *OcRunner) Run(args ...string) *gexec.Session

Run oc with given arguments

func (*OcRunner) SwitchProject

func (oc *OcRunner) SwitchProject(projectName string)

SwitchProject switch to the project

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL