...

Package helper

Overview ▾

Index ▾

Constants
Variables
func AppendToFile(filepath string, s string) error
func Chdir(dir string)
func ClearTelemetryFile()
func CmdRunner(program string, args ...string) *gexec.Session
func CommonAfterEach(commonVar CommonVar)
func CopyExample(exampleName string, targetDir string)
func CopyExampleDevFile(devfilePath, targetDst string, newName string, updaters ...DevfileUpdater)
func CopyManifestFile(fileName, targetDst string)
func CreateFileWithContent(path string, fileContent string) error
func CreateFileWithContentAndPerm(path string, fileContent string, perm os.FileMode) error
func CreateInvalidDevfile(dir string)
func CreateLocalEnv(context, compName, projectName string)
func CreateNewContext() string
func CreateRandProject() string
func CreateSimpleFile(context, filePrefix, fileExtension string) (string, string)
func DeleteDir(dir string)
func DeleteFile(filepath string)
func DeleteInvalidDevfile(dir string)
func DeleteProject(projectName string)
func DontMatchAllInOutput(output string, tonotmatch []string)
func EnableExperimentalMode()
func EnableTelemetryDebug() preference.Client
func ExpectString(ctx InteractiveContext, line string)
func ExtractK8sAndOcComponentsFromOutputOnPodman(out string) []string
func ExtractLines(output string) ([]string, error)
func FileShouldContainSubstring(file string, subString string)
func FileShouldNotContainSubstring(file string, subString string)
func FindFirstElementIndexByPredicate(slice []string, predicate func(string) bool) (int, bool)
func FindFirstElementIndexMatchingRegExp(slice []string, regularExpression string) (int, bool)
func GenerateAndSetContainersConf(dir string)
func GenerateDelayedPodman(commonVarContext string, delaySecond int) string
func GenerateProjectName() string
func GetAnnotationsDeployment(path, componentName, appName, projectName string) map[string]string
func GetCustomStartPort() int
func GetDebugTelemetryFile() string
func GetDevfileComponents(devfilePath, componentName string) []v1alpha2.Component
func GetEnvFromEntry(path string, componentName string, appName string, projectName string) string
func GetEnvRefNames(path, componentName, appName, projectName string) []string
func GetExamplePath(args ...string) string
func GetFirstProcess() int
func GetMDXContent(filePath string) (mdxContent string)
func GetMetadataFromDevfile(devfilePath string) devfilepkg.DevfileMetadata
func GetOdoVersion() (version string, gitCommit string)
func GetPodmanVersion() string
func GetPreferenceValue(key string) string
func GetSecrets(path, project string) string
func GetTelemetryDebugData() segment.TelemetryData
func GetUserHomeDir() string
func GetVersions(registryName string, stackName string) []string
func GetVolumeNamesFromDeployment(path, componentName, appName, projectName string) map[string]string
func Getwd() string
func HasAtLeastTwoVersions(registryName string, stackName string) bool
func HttpWaitForWithStatus(url string, match string, maxRetry int, interval int, expectedCode int)
func IsAuth(labels []string) bool
func IsJSON(s string) bool
func IsKubernetesCluster() bool
func JsonPathContentContain(json string, path string, value string)
func JsonPathContentHasLen(json string, path string, len int)
func JsonPathContentIs(json string, path string, value string)
func JsonPathContentIsValidUserPort(json string, path string)
func JsonPathDoesNotExist(json string, path string)
func JsonPathExist(json string, path string)
func JsonPathSatisfiesAll(json string, path string, matchers ...types.GomegaMatcher)
func LabelPodmanIf(value bool, args ...interface{}) []interface{}
func ListFilesInDir(directoryName string) []string
func LocalKubeconfigSet(context string)
func MakeDir(dir string)
func MatchAllInOutput(output string, tomatch []string)
func NeedsCluster(labels []string) bool
func NeedsPodman(labels []string) bool
func PressKey(ctx InteractiveContext, c byte)
func RandString(n int) string
func ReadFile(filePath string) (string, error)
func ReadRawDevfile(devfilePath string) parser.DevfileObj
func ReplaceAllForwardedPorts(docString string, cmdEndpointsMap map[string]string, mdxEndpointsMap map[string]string) (returnString string)
func ReplaceAllTimeInString(docString string, timeString string) string
func ReplaceRegistryUrl(commonVar CommonVar, docString string) string
func ReplaceString(filename string, oldString string, newString string)
func ReplaceStrings(filename string, oldStrings []string, newStrings []string)
func ResetExperimentalMode()
func ResetTelemetry()
func RunDevMode(options DevSessionOpts, inside func(session *gexec.Session, outContents string, errContents string, ports map[string]string)) error
func RunInteractive(command []string, env []string, tester Tester) (string, error)
func RunTestSpecs(t *testing.T, description string)
func RunWithExponentialBackoff(fxn func() error, maxDelayInSeconds int, expireDuration time.Duration) error
func SendLine(ctx InteractiveContext, line string)
func SetDefaultDevfileRegistry(commonVar *CommonVar)
func StripAnsi(docString string) (returnString string)
func StripGitCommitFromVersion(docString string) string
func StripInteractiveQuestion(docString string) (returnString string)
func StripSpinner(docString string) (returnString string)
func Unindented(jsonStr string) (string, error)
func UpdateDevfileContent(path string, handlers []DevfileUpdater)
func VerifyContainerSyncEnv(podName, containerName, namespace, projectSourceValue, projectsRootValue string, cliRunner CliRunner)
func VerifyFileExists(filename string) bool
func WaitAndCheckForTerminatingState(path, resourceType, namespace string, timeoutMinutes int) bool
func WaitAppReadyInContainer(cmp Component, container string, cmd []string, pollingInterval time.Duration, timeout time.Duration, stdoutMatcher types.GomegaMatcher, stderrMatcher types.GomegaMatcher)
func WaitForCmdOut(program string, args []string, timeoutInMinutes int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool
func WaitForErroutToContain(substring string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)
func WaitForOutputToContain(substring string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)
func WaitForOutputToContainOne(substrings []string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)
type CliRunner
    func GetCliRunner() CliRunner
type ClusterComponent
    func NewClusterComponent(name string, app string, mode string, namespace string, cli CliRunner) *ClusterComponent
    func (o *ClusterComponent) Exec(container string, args []string, expectedSuccess *bool) (string, string)
    func (o *ClusterComponent) ExpectIsDeployed()
    func (o *ClusterComponent) ExpectIsNotDeployed()
    func (o *ClusterComponent) GetAnnotations() map[string]string
    func (o *ClusterComponent) GetEnvVars(string) map[string]string
    func (o *ClusterComponent) GetJobDef() *batchv1.Job
    func (o *ClusterComponent) GetLabels() map[string]string
    func (o *ClusterComponent) GetPodDef() *corev1.Pod
    func (o *ClusterComponent) GetPodLogs() string
type CmdWrapper
    func Cmd(program string, args ...string) *CmdWrapper
    func (cw *CmdWrapper) AddEnv(args ...string) *CmdWrapper
    func (cw *CmdWrapper) Err() string
    func (cw *CmdWrapper) Out() string
    func (cw *CmdWrapper) OutAndErr() (string, string)
    func (cw *CmdWrapper) Runner() *CmdWrapper
    func (cw *CmdWrapper) Should(f func(session *gexec.Session))
    func (cw *CmdWrapper) ShouldFail() *CmdWrapper
    func (cw *CmdWrapper) ShouldPass() *CmdWrapper
    func (cw *CmdWrapper) ShouldRun() *CmdWrapper
    func (cw *CmdWrapper) WithEnv(args ...string) *CmdWrapper
    func (cw *CmdWrapper) WithRetry(maxRetry int, intervalSeconds time.Duration) *CmdWrapper
    func (cw *CmdWrapper) WithTerminate(timeoutAfter time.Duration, stop chan bool) *CmdWrapper
    func (cw *CmdWrapper) WithTimeout(timeoutAfter time.Duration) *CmdWrapper
    func (cw *CmdWrapper) WithWorkingDir(dir string) *CmdWrapper
type CommonVar
    func CommonBeforeEach() CommonVar
    func (c CommonVar) GetDevfileRegistryURL() string
type Component
    func NewComponent(componentName string, app string, mode string, namespace string, cli CliRunner) Component
type DevSession
    func StartDevMode(options DevSessionOpts) (devSession DevSession, err error)
    func WaitForDevModeToContain(options DevSessionOpts, substring string, stopSessionAfter bool, checkErrOut bool) (DevSession, error)
    func (o DevSession) CheckNotSynced(timeout time.Duration)
    func (o DevSession) GetExitCode() int
    func (o DevSession) Kill()
    func (o DevSession) PID() int
    func (o *DevSession) PressKey(p byte)
    func (o *DevSession) Stop()
    func (o *DevSession) UpdateInfo() error
    func (o DevSession) WaitEnd()
    func (o *DevSession) WaitRestartPortforward() error
    func (o *DevSession) WaitSync() error
type DevSessionOpts
type DevfileUpdater
    func SetFsGroup(containerName string, fsGroup int) DevfileUpdater
type InteractiveContext
type KubectlRunner
    func NewKubectlRunner(kubectlPath string) KubectlRunner
    func (kubectl KubectlRunner) AssertContainsLabel(kind, namespace, componentName, appName, mode, key, value string)
    func (kubectl KubectlRunner) AssertNoContainsLabel(kind, namespace, componentName, appName, mode, key string)
    func (kubectl KubectlRunner) AssertNonAuthenticated()
    func (kubectl KubectlRunner) CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool
    func (kubectl KubectlRunner) CreateAndSetRandNamespaceProject() string
    func (kubectl KubectlRunner) CreateAndSetRandNamespaceProjectOfLength(i int) string
    func (kubectl KubectlRunner) CreateSecret(secretName, secretPass, project string)
    func (kubectl KubectlRunner) DeleteNamespaceProject(projectName string, wait bool)
    func (kubectl KubectlRunner) DeletePod(podName string, namespace string)
    func (kubectl KubectlRunner) EnsureOperatorIsInstalled(partialOperatorName string)
    func (kubectl KubectlRunner) EnsurePodIsUp(namespace, podName string)
    func (kubectl KubectlRunner) Exec(podName string, projectName string, args []string, expectedSuccess *bool) (string, string)
    func (kubectl KubectlRunner) ExecListDir(podName string, projectName string, dir string) string
    func (kubectl KubectlRunner) GetActiveNamespace() string
    func (kubectl KubectlRunner) GetAllNamespaceProjects() []string
    func (kubectl KubectlRunner) GetAllPVCNames(namespace string) []string
    func (kubectl KubectlRunner) GetAllPodNames(namespace string) []string
    func (kubectl KubectlRunner) GetAllPodsInNs(namespace string) string
    func (kubectl KubectlRunner) GetAnnotationsDeployment(componentName, appName, projectName string) map[string]string
    func (kubectl KubectlRunner) GetBindableKinds() (string, string)
    func (kubectl KubectlRunner) GetContainerEnv(podName, containerName, namespace string) string
    func (kubectl KubectlRunner) GetEnvFromEntry(componentName string, appName string, projectName string) string
    func (kubectl KubectlRunner) GetEnvRefNames(componentName, appName, projectName string) []string
    func (kubectl KubectlRunner) GetEnvsDevFileDeployment(componentName, appName, projectName string) map[string]string
    func (kubectl KubectlRunner) GetJobNameByComponent(compName string, namespace string) string
    func (kubectl KubectlRunner) GetLogs(podName string) string
    func (kubectl KubectlRunner) GetNamespaceProject() string
    func (kubectl KubectlRunner) GetPVCSize(compName, storageName, namespace string) string
    func (kubectl KubectlRunner) GetPodInitContainers(compName string, namespace string) []string
    func (kubectl KubectlRunner) GetRunningPodNameByComponent(compName string, namespace string) string
    func (kubectl KubectlRunner) GetSecrets(project string) string
    func (kubectl KubectlRunner) GetServiceBinding(name, projectName string) (string, string)
    func (kubectl KubectlRunner) GetServices(namespace string) string
    func (kubectl KubectlRunner) GetVersion() string
    func (kubectl KubectlRunner) GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
    func (kubectl KubectlRunner) GetVolumeNamesFromDeployment(componentName, appName, projectName string) map[string]string
    func (kubectl KubectlRunner) HasNamespaceProject(name string) bool
    func (kubectl KubectlRunner) ListNamespaceProject(name string)
    func (kubectl KubectlRunner) PodsShouldBeRunning(project string, regex string)
    func (kubectl KubectlRunner) Run(args ...string) *gexec.Session
    func (kubectl KubectlRunner) ScalePodToZero(componentName, appName, projectName string)
    func (kubectl KubectlRunner) SetLabelsOnNamespace(ns string, labelValues ...string)
    func (kubectl KubectlRunner) SetProject(namespace string) string
    func (kubectl KubectlRunner) VerifyResourceDeleted(ri ResourceInfo)
    func (kubectl KubectlRunner) VerifyResourceToBeDeleted(ri ResourceInfo)
    func (kubectl KubectlRunner) WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool
    func (kubectl KubectlRunner) WaitAndCheckForTerminatingState(resourceType, namespace string, timeoutMinutes int) bool
    func (kubectl KubectlRunner) WaitForRunnerCmdOut(args []string, timeout int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool
type LogsSession
    func StartLogsFollow(podman bool, opts ...string) (LogsSession, []byte, []byte, error)
    func (o *LogsSession) Kill()
    func (o *LogsSession) OutContents() []byte
type OcRunner
    func NewOcRunner(ocPath string) OcRunner
    func (oc OcRunner) AddSecret(comvar CommonVar)
    func (oc OcRunner) AssertContainsLabel(kind, namespace, componentName, appName, mode, key, value string)
    func (oc OcRunner) AssertNoContainsLabel(kind, namespace, componentName, appName, mode, key string)
    func (oc OcRunner) AssertNonAuthenticated()
    func (oc OcRunner) CheckCmdOpInRemoteCmpPod(cmpName string, appName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool
    func (oc OcRunner) CheckCmdOpInRemoteDevfilePod(podName string, containerName string, prjName string, cmd []string, checkOp func(cmdOp string, err error) bool) bool
    func (oc OcRunner) CreateAndSetRandNamespaceProject() string
    func (oc OcRunner) CreateAndSetRandNamespaceProjectOfLength(i int) string
    func (oc OcRunner) CreateSecret(secretName, secretPass, project string)
    func (oc OcRunner) DeleteNamespaceProject(projectName string, wait bool)
    func (oc OcRunner) DeletePod(podName string, namespace string)
    func (oc OcRunner) EnsureOperatorIsInstalled(partialOperatorName string)
    func (oc OcRunner) EnsurePodIsUp(namespace, podName string)
    func (oc OcRunner) Exec(podName string, projectName string, args []string, expectedSuccess *bool) (string, string)
    func (oc OcRunner) ExecListDir(podName string, projectName string, dir string) string
    func (oc OcRunner) GetActiveNamespace() string
    func (oc OcRunner) GetAllNamespaceProjects() []string
    func (oc OcRunner) GetAllPVCNames(namespace string) []string
    func (oc OcRunner) GetAllPodNames(namespace string) []string
    func (oc OcRunner) GetAllPodsInNs(namespace string) string
    func (oc OcRunner) GetAnnotationsDeployment(componentName, appName, projectName string) map[string]string
    func (oc OcRunner) GetBindableKinds() (string, string)
    func (oc OcRunner) GetContainerEnv(podName, containerName, namespace string) string
    func (oc OcRunner) GetCurrentProject() string
    func (oc OcRunner) GetCurrentServerURL() string
    func (oc OcRunner) GetEnvFromEntry(componentName string, appName string, projectName string) string
    func (oc OcRunner) GetEnvRefNames(componentName, appName, projectName string) []string
    func (oc OcRunner) GetEnvsDevFileDeployment(componentName, appName, projectName string) map[string]string
    func (oc OcRunner) GetJobNameByComponent(compName string, namespace string) string
    func (oc OcRunner) GetLoginUser() string
    func (oc OcRunner) GetLogs(podName string) string
    func (oc OcRunner) GetNamespaceProject() string
    func (oc OcRunner) GetPVCSize(compName, storageName, namespace string) string
    func (oc OcRunner) GetPodInitContainers(compName string, 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) GetSecrets(project string) string
    func (oc OcRunner) GetServiceBinding(name, projectName string) (string, string)
    func (oc OcRunner) GetServices(namespace string) string
    func (oc OcRunner) GetToken() string
    func (oc OcRunner) GetVersion() string
    func (oc OcRunner) GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
    func (oc OcRunner) GetVolumeNamesFromDeployment(componentName, appName, projectName string) map[string]string
    func (oc OcRunner) HasNamespaceProject(name string) bool
    func (oc OcRunner) ListNamespaceProject(name string)
    func (oc OcRunner) LoginUsingToken(token string) string
    func (oc OcRunner) Logout()
    func (oc OcRunner) PodsShouldBeRunning(project string, regex string)
    func (oc OcRunner) Run(args ...string) *gexec.Session
    func (oc OcRunner) ScalePodToZero(componentName, appName, projectName string)
    func (oc OcRunner) ServiceInstanceStatus(serviceInstanceName string) string
    func (oc OcRunner) SetLabelsOnNamespace(ns string, labelValues ...string)
    func (oc OcRunner) SetProject(namespace string) string
    func (oc OcRunner) StatFileInPod(cmpName, appName, project, filepath string) string
    func (oc OcRunner) VerifyResourceDeleted(ri ResourceInfo)
    func (oc OcRunner) VerifyResourceToBeDeleted(ri ResourceInfo)
    func (oc OcRunner) WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool
    func (oc OcRunner) WaitAndCheckForTerminatingState(resourceType, namespace string, timeoutMinutes int) bool
    func (oc OcRunner) WaitForRunnerCmdOut(args []string, timeout int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool
type OdoV2Watch
type PodmanComponent
    func NewPodmanComponent(componentName string, app string) *PodmanComponent
    func (o *PodmanComponent) Exec(container string, args []string, expectedSuccess *bool) (string, string)
    func (o *PodmanComponent) ExpectIsDeployed()
    func (o *PodmanComponent) ExpectIsNotDeployed()
    func (o *PodmanComponent) GetAnnotations() map[string]string
    func (o *PodmanComponent) GetEnvVars(container string) map[string]string
    func (o *PodmanComponent) GetJobDef() *batchv1.Job
    func (o *PodmanComponent) GetLabels() map[string]string
    func (o *PodmanComponent) GetPodDef() *corev1.Pod
    func (o *PodmanComponent) GetPodLogs() string
    func (o *PodmanComponent) ListImages() string
type Registry
    func NewRegistry(url string) Registry
    func (o Registry) GetIndex() ([]api.DevfileStack, error)
    func (o Registry) GetStack(name string) (api.DevfileStack, error)
type RegistryServer
type ResourceInfo
type Tester

Package files

component_cluster.go component_interface.go component_podman.go helper_cli.go helper_cmd_wrapper.go helper_component.go helper_configValidate.go helper_dev.go helper_devfile.go helper_documentation.go helper_experimental.go helper_filesystem.go helper_generic.go helper_http.go helper_interactive.go helper_kubectl.go helper_logs.go helper_nowindows.go helper_oc.go helper_podman.go helper_registry.go helper_run.go helper_telemetry.go kubernetes_utils.go labels.go odo_utils.go

Constants

const (
    ResourceTypeDeployment = "deployment"
    ResourceTypePod        = "pod"
    ResourceTypeJob        = "job"
    ResourceTypePVC        = "pvc"
    ResourceTypeService    = "service"
)
const (
    LabelNoCluster       = "nocluster"
    LabelUnauth          = "unauth"
    LabelPodman          = "podman"
    LabelServiceBinding  = "servicebinding"
    LabelSkipOnOpenShift = "skiponopenshift"
)
const (
    DebugTelemetryFileEnv = "ODO_DEBUG_TELEMETRY_FILE"
)
const (
    TelemetryCaller = "TELEMETRY_CALLER"
)

Variables

DevfileCommandGroupUpdater updates the group definition of the specified command. It returns an error if the command was not found in the Devfile, or if there are multiple commands with the same name and type.

var DevfileCommandGroupUpdater = func(cmdName string, cmdType v1alpha2.CommandType, group *v1alpha2.CommandGroup) DevfileUpdater {
    return func(d *parser.DevfileObj) error {
        cmds, err := d.Data.GetCommands(parsercommon.DevfileOptions{
            CommandOptions: parsercommon.CommandOptions{
                CommandType: cmdType,
            },
            FilterByName: cmdName,
        })
        if err != nil {
            return err
        }
        if len(cmds) != 1 {
            return fmt.Errorf("found %v command(s) with name %q", len(cmds), cmdName)
        }
        cmd := cmds[0]
        switch cmdType {
        case v1alpha2.ApplyCommandType:
            cmd.Apply.Group = group
        case v1alpha2.CompositeCommandType:
            cmd.Composite.Group = group
        case v1alpha2.CustomCommandType:
            cmd.Custom.Group = group
        case v1alpha2.ExecCommandType:
            cmd.Exec.Group = group
        default:
            return fmt.Errorf("command type not handled: %q", cmdType)
        }
        return nil
    }
}

DevfileMetadataNameRemover removes the 'metadata.name' field from the given Devfile

var DevfileMetadataNameRemover = DevfileMetadataNameSetter("")

DevfileMetadataNameSetter sets the 'metadata.name' field into the given Devfile

var DevfileMetadataNameSetter = func(name string) DevfileUpdater {
    return func(d *parser.DevfileObj) error {
        return d.SetMetadataName(name)
    }
}

func AppendToFile

func AppendToFile(filepath string, s string) error

func Chdir

func Chdir(dir string)

Chdir change current working dir

func ClearTelemetryFile

func ClearTelemetryFile()

func CmdRunner

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

func CommonAfterEach

func CommonAfterEach(commonVar CommonVar)

CommonAfterEach is common function that cleans up after every test Spec (It)

func CopyExample

func CopyExample(exampleName string, targetDir string)

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

func CopyExampleDevFile

func CopyExampleDevFile(devfilePath, targetDst string, newName string, updaters ...DevfileUpdater)

CopyExampleDevFile copies an example devfile from tests/examples/source/devfiles/<componentName>/devfile.yaml into targetDst. If newName is not empty, it will replace the component name in the target Devfile. The Devfile updaters allow to perform operations against the target Devfile, like removing the component name (via DevfileMetadataNameRemover).

func CopyManifestFile

func CopyManifestFile(fileName, targetDst string)

func CreateFileWithContent

func CreateFileWithContent(path string, fileContent string) error

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 CreateFileWithContentAndPerm

func CreateFileWithContentAndPerm(path string, fileContent string, perm os.FileMode) error

CreateFileWithContentAndPerm creates a file at the given path using the given file permissions, 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 CreateInvalidDevfile

func CreateInvalidDevfile(dir string)

func CreateLocalEnv

func CreateLocalEnv(context, compName, projectName string)

CreateLocalEnv creates a .odo/env/env.yaml file Useful for commands that require this file and cannot create one on their own, for e.g. url, list

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 CreateSimpleFile

func CreateSimpleFile(context, filePrefix, fileExtension string) (string, string)

CreateSimpleFile creates a simple file return the file path with random string

func DeleteDir

func DeleteDir(dir string)

DeleteDir deletes the specified path; due to Windows behaviour (for example https://github.com/redhat-developer/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 DeleteFile

func DeleteFile(filepath string)

DeleteFile deletes file

func DeleteInvalidDevfile

func DeleteInvalidDevfile(dir string)

func DeleteProject

func DeleteProject(projectName string)

DeleteProject deletes a specified project

func DontMatchAllInOutput

func DontMatchAllInOutput(output string, tonotmatch []string)

DontMatchAllInOutput ensures all strings are not in output

func EnableExperimentalMode

func EnableExperimentalMode()

EnableExperimentalMode enables the experimental mode, so that experimental features of odo can be used.

func EnableTelemetryDebug

func EnableTelemetryDebug() preference.Client

EnableTelemetryDebug creates a temp file to use for debugging telemetry. it also sets up envs and cfg for the same

func ExpectString

func ExpectString(ctx InteractiveContext, line string)

func ExtractK8sAndOcComponentsFromOutputOnPodman

func ExtractK8sAndOcComponentsFromOutputOnPodman(out string) []string

ExtractK8sAndOcComponentsFromOutputOnPodman extracts the list of Kubernetes and OpenShift components from the "odo" output on Podman.

func ExtractLines

func ExtractLines(output string) ([]string, error)

ExtractLines returns all lines of the given `output` string

func FileShouldContainSubstring

func FileShouldContainSubstring(file string, subString string)

FileShouldContainSubstring check if file contains subString

func FileShouldNotContainSubstring

func FileShouldNotContainSubstring(file string, subString string)

FileShouldNotContainSubstring check if file does not contain subString

func FindFirstElementIndexByPredicate

func FindFirstElementIndexByPredicate(slice []string, predicate func(string) bool) (int, bool)

FindFirstElementIndexByPredicate returns the index of the first element in `slice` that satisfies the given `predicate`.

func FindFirstElementIndexMatchingRegExp

func FindFirstElementIndexMatchingRegExp(slice []string, regularExpression string) (int, bool)

FindFirstElementIndexMatchingRegExp returns the index of the first element in `slice` that contains any match of the given regular expression `regularExpression`.

func GenerateAndSetContainersConf

func GenerateAndSetContainersConf(dir string)

func GenerateDelayedPodman

func GenerateDelayedPodman(commonVarContext string, delaySecond int) string

GenerateDelayedPodman returns a podman cmd that sleeps for delaySecond before responding; this function is usually used in combination with PODMAN_CMD_INIT_TIMEOUT odo preference

func GenerateProjectName

func GenerateProjectName() string

GenerateProjectName generates a new projectName based on the name of the test file name (without path and replacing _ with -), line number of current ginkgo execution, and a random string of 3 letters

func GetAnnotationsDeployment

func GetAnnotationsDeployment(path, componentName, appName, projectName string) map[string]string

GetAnnotationsDeployment gets the annotations from the deployment belonging to the given component, app and project

func GetCustomStartPort

func GetCustomStartPort() int

GetCustomStartPort returns a port that can be used as starting value for custom port mapping. Because of the way Ginkgo runs specs in parallel (by isolating them in different processes), this function needs to be called in a Before* node or test spec. It returns a starting value that aims at minimizing the probability of collisions. Callers can then safely increment the returned value in their specs if needed.

func GetDebugTelemetryFile

func GetDebugTelemetryFile() string

func GetDevfileComponents

func GetDevfileComponents(devfilePath, componentName string) []v1alpha2.Component

func GetEnvFromEntry

func GetEnvFromEntry(path string, componentName string, appName string, projectName string) string

GetEnvFromEntry returns envFrom entry of the deployment

func GetEnvRefNames

func GetEnvRefNames(path, componentName, appName, projectName string) []string

GetEnvRefNames gets the ref values from the envFroms of the deployment belonging to the given data

func GetExamplePath

func GetExamplePath(args ...string) string

func GetFirstProcess

func GetFirstProcess() int

func GetMDXContent

func GetMDXContent(filePath string) (mdxContent string)

GetMDXContent reads the content of MDX files, strips it of extra spaces and returns the string it strips the extra space for an easy comparison

func GetMetadataFromDevfile

func GetMetadataFromDevfile(devfilePath string) devfilepkg.DevfileMetadata

GetMetadataFromDevfile retrieves the metadata from devfile

func GetOdoVersion

func GetOdoVersion() (version string, gitCommit string)

func GetPodmanVersion

func GetPodmanVersion() string

Returns version of installed podman

func GetPreferenceValue

func GetPreferenceValue(key string) string

GetPreferenceValue a global config value of given key or returns an empty string if value is not set

func GetSecrets

func GetSecrets(path, project string) string

GetSecrets gets all the secrets belonging to the project

func GetTelemetryDebugData

func GetTelemetryDebugData() segment.TelemetryData

GetTelemetryDebugData gets telemetry data dumped into temp file for testing/debugging

func GetUserHomeDir

func GetUserHomeDir() string

GetUserHomeDir gets the user home directory

func GetVersions

func GetVersions(registryName string, stackName string) []string

GetVersions returns the list of all versions for the given stack name in the given Devfile registry. It uses the "odo registry" command to find out this information.

The registry name is optional, and defaults to DefaultDevfileRegistry if not set.

func GetVolumeNamesFromDeployment

func GetVolumeNamesFromDeployment(path, componentName, appName, projectName string) map[string]string

GetVolumeNamesFromDeployment gets the volumes from the deployment belonging to the given data

func Getwd

func Getwd() string

Getwd returns current working dir

func HasAtLeastTwoVersions

func HasAtLeastTwoVersions(registryName string, stackName string) bool

HasAtLeastTwoVersions returns whether the given stack in the given Devfile registry has at least two versions. This is useful to determine if the "Select version" prompt will be displayed in the interactive "odo init" tests. Otherwise, "odo init" would just skip this "Select version" prompt if the stack selected has no version or only a single one.

Note that the registry name is optional, and defaults to DefaultDevfileRegistry if not set.

func HttpWaitForWithStatus

func HttpWaitForWithStatus(url string, match string, maxRetry int, interval int, expectedCode int)

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

func IsAuth

func IsAuth(labels []string) bool

func IsJSON

func IsJSON(s string) bool

IsJSON returns true if a string is in json format

func IsKubernetesCluster

func IsKubernetesCluster() bool

func JsonPathContentContain

func JsonPathContentContain(json string, path string, value string)

JsonPathContentContain expects that the content of the path to contain value

func JsonPathContentHasLen

func JsonPathContentHasLen(json string, path string, len int)

func JsonPathContentIs

func JsonPathContentIs(json string, path string, value string)

JsonPathContentIs expects that the content of the path to equal value

func JsonPathContentIsValidUserPort

func JsonPathContentIsValidUserPort(json string, path string)

func JsonPathDoesNotExist

func JsonPathDoesNotExist(json string, path string)

JsonPathDoesNotExist expects that the content of the path does not exist in the JSON string

func JsonPathExist

func JsonPathExist(json string, path string)

JsonPathExist expects that the content of the path exists in the JSON string

func JsonPathSatisfiesAll

func JsonPathSatisfiesAll(json string, path string, matchers ...types.GomegaMatcher)

JsonPathSatisfiesAll expects content of the path to satisfy all the matchers passed to it

func LabelPodmanIf

func LabelPodmanIf(value bool, args ...interface{}) []interface{}

func ListFilesInDir

func ListFilesInDir(directoryName string) []string

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 MakeDir

func MakeDir(dir string)

MakeDir creates a new dir

func MatchAllInOutput

func MatchAllInOutput(output string, tomatch []string)

MatchAllInOutput ensures all strings are in output

func NeedsCluster

func NeedsCluster(labels []string) bool

func NeedsPodman

func NeedsPodman(labels []string) bool

func PressKey

func PressKey(ctx InteractiveContext, c byte)

func RandString

func RandString(n int) string

RandString returns a random string of given length

func ReadFile

func ReadFile(filePath string) (string, error)

ReadFile reads the file from the filePath

func ReadRawDevfile

func ReadRawDevfile(devfilePath string) parser.DevfileObj

ReadRawDevfile parses and validates the Devfile specified and returns its raw content.

func ReplaceAllForwardedPorts

func ReplaceAllForwardedPorts(docString string, cmdEndpointsMap map[string]string, mdxEndpointsMap map[string]string) (returnString string)

ReplaceAllForwardedPorts replaces the actual endpoints in cmd out with the ones in mdx out

func ReplaceAllTimeInString

func ReplaceAllTimeInString(docString string, timeString string) string

ReplaceAllTimeInString replaces the time taken to download a Devfile or a starter project for an odo command with a custom value; this function is helpful because the time value is variable and replacing it with the value in mdx content helps in comparing.

func ReplaceRegistryUrl

func ReplaceRegistryUrl(commonVar CommonVar, docString string) string

ReplaceRegistryUrl replaces the registry URL used for testing by a more static one

func ReplaceString

func ReplaceString(filename string, oldString string, newString string)

ReplaceString replaces oldString with newString in text file

func ReplaceStrings

func ReplaceStrings(filename string, oldStrings []string, newStrings []string)

ReplaceStrings replaces oldStrings with newStrings in text file two arrays must be of same length, else will fail

func ResetExperimentalMode

func ResetExperimentalMode()

ResetExperimentalMode disables the experimental mode.

Note that calling any experimental feature of odo right is expected to error out if experimental mode is not enabled.

func ResetTelemetry

func ResetTelemetry()

ResetTelemetry resets the telemetry back to original values

func RunDevMode

func RunDevMode(options DevSessionOpts, inside func(session *gexec.Session, outContents string, errContents string, ports map[string]string)) error

RunDevMode runs a dev session and executes the `inside` code when the dev mode is completely started The inside handler is passed the internal session pointer, the contents of the standard and error outputs, and a slice of strings - ports - giving the redirections in the form localhost:<port_number> to access ports opened by component

func RunInteractive

func RunInteractive(command []string, env []string, tester Tester) (string, error)

RunInteractive runs the command in interactive mode and returns the output, and error. It takes command as array of strings, and a function `tester` that contains steps to run the test as an argument. The command is executed as a separate process, the environment of which is controlled via the `env` argument. The initial value of the sub-process environment is a copy of the environment of the current process. If `env` is not `nil`, it will be appended to the end of the sub-process environment. If there are duplicate environment keys, only the last value in the slice for each duplicate key is used.

func RunTestSpecs

func RunTestSpecs(t *testing.T, description string)

RunTestSpecs defines a common way how test specs in test suite are executed

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 SendLine

func SendLine(ctx InteractiveContext, line string)

func SetDefaultDevfileRegistry

func SetDefaultDevfileRegistry(commonVar *CommonVar)

func StripAnsi

func StripAnsi(docString string) (returnString string)

StripAnsi strips the cmd out of ansi values used for fomatting(underline, colored line, etc.) the cmd out; this function should be called before StripSpinner for better results and is essential because mdx content does not support ansi The regex used by this function is copied from https://github.com/acarl005/stripansi/

func StripGitCommitFromVersion

func StripGitCommitFromVersion(docString string) string

StripGitCommitFromVersion removes any git commit hash from the full odo version string. For example, given a version string like "vX.Y.Z (6721c668b)", it will simply return "vX.Y.Z"

func StripInteractiveQuestion

func StripInteractiveQuestion(docString string) (returnString string)

StripInteractiveQuestion strips the extra output from interactive questions, leaving the final output e.g. "? Is this correct? (Y/n) No? Is this correct? No"

func StripSpinner

func StripSpinner(docString string) (returnString string)

StripSpinner strips the cmd out string of spaces, spinner statements and spinner frames

func Unindented

func Unindented(jsonStr string) (string, error)

Unindented returns the unindented version of the jsonStr passed to it

func UpdateDevfileContent

func UpdateDevfileContent(path string, handlers []DevfileUpdater)

UpdateDevfileContent parses the Devfile at the given path, then updates its content using the given handlers, and writes the updated Devfile to the given path.

The handlers are invoked in the order they are provided.

No operation is performed if no handler function is specified.

See DevfileMetadataNameRemover for an example of handler function that can operate on the Devfile content.

func VerifyContainerSyncEnv

func VerifyContainerSyncEnv(podName, containerName, namespace, projectSourceValue, projectsRootValue string, cliRunner CliRunner)

VerifyContainerSyncEnv verifies the sync env in the container

func VerifyFileExists

func VerifyFileExists(filename string) bool

VerifyFileExists receives a path to a file, and returns whether or not it points to an existing file

func WaitAndCheckForTerminatingState

func WaitAndCheckForTerminatingState(path, resourceType, namespace string, timeoutMinutes int) bool

WaitAndCheckForTerminatingState waits for the given interval and checks if the given resource type has been deleted on the cluster or is in the terminating state path is the path to the program's binary

func WaitAppReadyInContainer

func WaitAppReadyInContainer(
    cmp Component,
    container string,
    cmd []string,
    pollingInterval time.Duration,
    timeout time.Duration,
    stdoutMatcher types.GomegaMatcher,
    stderrMatcher types.GomegaMatcher,
)

WaitAppReadyInContainer probes the remote container using the specified command (cmd). It waits until the specified timeout is reached or until the provided matchers match the remote command output. At least one of the matchers must be provided.

func WaitForCmdOut

func WaitForCmdOut(program string, args []string, timeoutInMinutes 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) timeoutInMinutes (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 WaitForErroutToContain

func WaitForErroutToContain(substring string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)

WaitForErroutToContain waits for the session stdout output to contain a particular substring if the session exits, it checks for the substring and returns early

func WaitForOutputToContain

func WaitForOutputToContain(substring string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)

WaitForOutputToContain waits for the session stdout output to contain a particular substring; if the session exits, it checks for the substring and returns early

func WaitForOutputToContainOne

func WaitForOutputToContainOne(substrings []string, timeoutInSeconds int, intervalInSeconds int, session *gexec.Session)

type CliRunner

CliRunner requires functions which are common for oc and kubectl 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(args ...string) *gexec.Session
    ExecListDir(podName string, projectName string, dir string) string
    // Exec executes the command in the specified pod and project/namespace.
    // If expectedSuccess is nil, the command is just supposed to run, with no assertion on its exit code.
    // If *expectedSuccess is true, the command exit code is expected to be 0.
    // If *expectedSuccess is false, the command exit code is expected to be non-zero.
    Exec(podName string, projectName string, args []string, expectedSuccess *bool) (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
    GetJobNameByComponent(compName string, namespace string) string
    GetVolumeMountNamesandPathsFromContainer(deployName string, containerName, namespace string) string
    WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool
    GetServices(namespace string) string
    CreateAndSetRandNamespaceProject() string
    CreateAndSetRandNamespaceProjectOfLength(i int) string
    SetProject(namespace string) string

    // DeleteNamespaceProject deletes the specified namespace or project, optionally waiting until it is gone
    DeleteNamespaceProject(projectName string, wait bool)

    DeletePod(podName string, projectName string)
    GetAllNamespaceProjects() []string
    GetNamespaceProject() string

    // HasNamespaceProject returns whether the specified namespace or project exists in the cluster
    HasNamespaceProject(name string) bool
    // ListNamespaceProject checks if the namespace is present in the list of namespaces
    ListNamespaceProject(name string)

    GetActiveNamespace() string
    GetEnvsDevFileDeployment(componentName, appName, projectName string) map[string]string
    GetEnvRefNames(componentName, appName, projectName string) []string
    GetPVCSize(compName, storageName, namespace string) string
    GetAllPVCNames(namespace string) []string
    GetPodInitContainers(compName, namespace string) []string
    GetContainerEnv(podName, containerName, namespace string) string
    WaitAndCheckForTerminatingState(resourceType, namespace string, timeoutMinutes int) bool
    VerifyResourceDeleted(ri ResourceInfo)
    VerifyResourceToBeDeleted(ri ResourceInfo)
    GetAnnotationsDeployment(cmpName, appName, projectName string) map[string]string
    GetAllPodsInNs(namespace string) string
    WaitForRunnerCmdOut(args []string, timeout int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool
    PodsShouldBeRunning(project string, regex string)
    CreateSecret(secretName, secretPass, project string)
    GetSecrets(project string) string
    GetEnvFromEntry(componentName string, appName string, projectName string) string
    GetVolumeNamesFromDeployment(componentName, appName, projectName string) map[string]string
    ScalePodToZero(componentName, appName, projectName string)
    GetAllPodNames(namespace string) []string
    EnsureOperatorIsInstalled(partialOperatorName string)
    GetBindableKinds() (string, string)
    GetServiceBinding(name, projectName string) (string, string)
    GetLogs(podName string) string
    AssertContainsLabel(kind, namespace, componentName, appName, mode, key, value string)
    AssertNoContainsLabel(kind, namespace, componentName, appName, mode, key string)
    EnsurePodIsUp(namespace, podName string)
    AssertNonAuthenticated()
    GetVersion() string
    SetLabelsOnNamespace(ns string, labelValues ...string)
}

func GetCliRunner

func GetCliRunner() CliRunner

GetCliRunner gets the running cli against Kubernetes or OpenShift

type ClusterComponent

ClusterComponent is an abstraction for a Devfile Component deployed on a cluster (either Kubernetes or OpenShift)

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

func NewClusterComponent

func NewClusterComponent(name string, app string, mode string, namespace string, cli CliRunner) *ClusterComponent

func (*ClusterComponent) Exec

func (o *ClusterComponent) Exec(container string, args []string, expectedSuccess *bool) (string, string)

func (*ClusterComponent) ExpectIsDeployed

func (o *ClusterComponent) ExpectIsDeployed()

func (*ClusterComponent) ExpectIsNotDeployed

func (o *ClusterComponent) ExpectIsNotDeployed()

func (*ClusterComponent) GetAnnotations

func (o *ClusterComponent) GetAnnotations() map[string]string

func (*ClusterComponent) GetEnvVars

func (o *ClusterComponent) GetEnvVars(string) map[string]string

func (*ClusterComponent) GetJobDef

func (o *ClusterComponent) GetJobDef() *batchv1.Job

func (*ClusterComponent) GetLabels

func (o *ClusterComponent) GetLabels() map[string]string

func (*ClusterComponent) GetPodDef

func (o *ClusterComponent) GetPodDef() *corev1.Pod

func (*ClusterComponent) GetPodLogs

func (o *ClusterComponent) GetPodLogs() string

type CmdWrapper

type CmdWrapper struct {
    Cmd *exec.Cmd
    // contains filtered or unexported fields
}

func Cmd

func Cmd(program string, args ...string) *CmdWrapper

func (*CmdWrapper) AddEnv

func (cw *CmdWrapper) AddEnv(args ...string) *CmdWrapper

func (*CmdWrapper) Err

func (cw *CmdWrapper) Err() string

func (*CmdWrapper) Out

func (cw *CmdWrapper) Out() string

func (*CmdWrapper) OutAndErr

func (cw *CmdWrapper) OutAndErr() (string, string)

func (*CmdWrapper) Runner

func (cw *CmdWrapper) Runner() *CmdWrapper

func (*CmdWrapper) Should

func (cw *CmdWrapper) Should(f func(session *gexec.Session))

func (*CmdWrapper) ShouldFail

func (cw *CmdWrapper) ShouldFail() *CmdWrapper

func (*CmdWrapper) ShouldPass

func (cw *CmdWrapper) ShouldPass() *CmdWrapper

func (*CmdWrapper) ShouldRun

func (cw *CmdWrapper) ShouldRun() *CmdWrapper

func (*CmdWrapper) WithEnv

func (cw *CmdWrapper) WithEnv(args ...string) *CmdWrapper

func (*CmdWrapper) WithRetry

func (cw *CmdWrapper) WithRetry(maxRetry int, intervalSeconds time.Duration) *CmdWrapper

func (*CmdWrapper) WithTerminate

func (cw *CmdWrapper) WithTerminate(timeoutAfter time.Duration, stop chan bool) *CmdWrapper

func (*CmdWrapper) WithTimeout

func (cw *CmdWrapper) WithTimeout(timeoutAfter time.Duration) *CmdWrapper

func (*CmdWrapper) WithWorkingDir

func (cw *CmdWrapper) WithWorkingDir(dir string) *CmdWrapper

type CommonVar

type CommonVar struct {
    // Project is new clean project/namespace for each test
    Project string
    // Context is a new temporary directory
    Context string
    // ConfigDir is a new temporary directory
    ConfigDir string
    // CliRunner is program command (oc or kubectl runner) according to cluster
    CliRunner CliRunner
    // original values to get restored after the test is done
    OriginalWorkingDirectory string
    OriginalKubeconfig       string
    // contains filtered or unexported fields
}

func CommonBeforeEach

func CommonBeforeEach() CommonVar

CommonBeforeEach is common function runs before every test Spec (It) returns CommonVar values that are used within the test script

func (CommonVar) GetDevfileRegistryURL

func (c CommonVar) GetDevfileRegistryURL() string

type Component

Component is an abstraction for a Devfile Component deployed on a specific platform

type Component interface {
    // ExpectIsDeployed checks that the component is deployed
    ExpectIsDeployed()
    // ExpectIsNotDeployed checks that the component is not deployed
    ExpectIsNotDeployed()
    // Exec executes the command in specific container of the component.
    // If expectedSuccess is nil, the command is just supposed to run, with no assertion on its exit code.
    // If *expectedSuccess is true, the command exit code is expected to be 0.
    // If *expectedSuccess is false, the command exit code is expected to be non-zero.
    Exec(container string, args []string, expectedSuccess *bool) (string, string)
    // GetEnvVars returns the environment variables defined for the container
    GetEnvVars(container string) map[string]string
    // GetLabels returns the labels defined for the component
    GetLabels() map[string]string
    // GetAnnotations returns the annotations defined for the component
    GetAnnotations() map[string]string
    // GetPodDef returns the definition of the pod
    GetPodDef() *corev1.Pod
    // GetJobDef returns the definition of the job
    GetJobDef() *batchv1.Job
    // GetPodLogs returns logs for the pod
    GetPodLogs() string
}

func NewComponent

func NewComponent(componentName string, app string, mode string, namespace string, cli CliRunner) Component

type DevSession

type DevSession struct {
    StdOut            string
    ErrOut            string
    Endpoints         map[string]string
    APIServerEndpoint string
    // contains filtered or unexported fields
}

func StartDevMode

func StartDevMode(options DevSessionOpts) (devSession DevSession, err error)

StartDevMode starts a dev session with `odo dev` It returns a session structure, the contents of the standard and error outputs and the redirections endpoints to access ports opened by component when the dev mode is completely started

func WaitForDevModeToContain

func WaitForDevModeToContain(options DevSessionOpts, substring string, stopSessionAfter bool, checkErrOut bool) (DevSession, error)

WaitForDevModeToContain runs `odo dev` until it contains a given substring in output or errOut(depending on checkErrOut arg). `odo dev` runs in an infinite reconciliation loop, and hence running it with Cmd will not work for a lot of failing cases, this function is helpful in such cases. If stopSessionAfter is false, it is up to the caller to stop the DevSession returned. TODO(pvala): Modify StartDevMode to take substring arg into account, and replace this method with it.

func (DevSession) CheckNotSynced

func (o DevSession) CheckNotSynced(timeout time.Duration)

func (DevSession) GetExitCode

func (o DevSession) GetExitCode() int

func (DevSession) Kill

func (o DevSession) Kill()

Kill a Dev session abruptly, without handling any cleanup

func (DevSession) PID

func (o DevSession) PID() int

func (*DevSession) PressKey

func (o *DevSession) PressKey(p byte)

func (*DevSession) Stop

func (o *DevSession) Stop()

Stop a Dev session cleanly (equivalent as hitting Ctrl-c)

func (*DevSession) UpdateInfo

func (o *DevSession) UpdateInfo() error

UpdateInfo returns the contents of the standard and error outputs and the list of forwarded ports since the end of the dev mode or the last time WaitSync/UpdateInfo has been called

func (DevSession) WaitEnd

func (o DevSession) WaitEnd()

func (*DevSession) WaitRestartPortforward

func (o *DevSession) WaitRestartPortforward() error

func (*DevSession) WaitSync

func (o *DevSession) WaitSync() error

WaitSync waits for the synchronization of files to be finished It returns the contents of the standard and error outputs and the list of forwarded ports since the end of the dev mode or the last time WaitSync/UpdateInfo has been called

type DevSessionOpts

type DevSessionOpts struct {
    EnvVars          []string
    CmdlineArgs      []string
    RunOnPodman      bool
    TimeoutInSeconds int
    NoRandomPorts    bool
    NoWatch          bool
    NoCommands       bool
    CustomAddress    string
    StartAPIServer   bool
    APIServerPort    int
    SyncGitDir       bool
    ShowLogs         bool
    VerboseLevel     string
}

type DevfileUpdater

DevfileUpdater is a helper type that can mutate a Devfile object. It is intended to be used in conjunction with the UpdateDevfileContent function.

type DevfileUpdater func(*parser.DevfileObj) error

func SetFsGroup

func SetFsGroup(containerName string, fsGroup int) DevfileUpdater

SetFsGroup is a DevfileUpdater which sets an attribute to a container to set a specific fsGroup for the container's pod

type InteractiveContext

InteractiveContext represents the context of an interactive command to be run.

type InteractiveContext struct {

    // Command represents the original command ran
    Command []string

    // A function to call to stop the process
    StopCommand func()
    // contains filtered or unexported fields
}

type KubectlRunner

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

func NewKubectlRunner

func NewKubectlRunner(kubectlPath string) KubectlRunner

NewKubectlRunner initializes new KubectlRunner

func (KubectlRunner) AssertContainsLabel

func (kubectl KubectlRunner) AssertContainsLabel(kind, namespace, componentName, appName, mode, key, value string)

func (KubectlRunner) AssertNoContainsLabel

func (kubectl KubectlRunner) AssertNoContainsLabel(kind, namespace, componentName, appName, mode, key string)

func (KubectlRunner) AssertNonAuthenticated

func (kubectl KubectlRunner) AssertNonAuthenticated()

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) CreateAndSetRandNamespaceProject

func (kubectl KubectlRunner) CreateAndSetRandNamespaceProject() string

CreateAndSetRandNamespaceProject create and set new project

func (KubectlRunner) CreateAndSetRandNamespaceProjectOfLength

func (kubectl KubectlRunner) CreateAndSetRandNamespaceProjectOfLength(i int) string

CreateRandNamespaceProjectOfLength create new project with i as the length of the name and sets it to the current context

func (KubectlRunner) CreateSecret

func (kubectl KubectlRunner) CreateSecret(secretName, secretPass, project string)

CreateSecret takes secret name, password and the namespace where we want to create the specific secret into the cluster

func (KubectlRunner) DeleteNamespaceProject

func (kubectl KubectlRunner) DeleteNamespaceProject(projectName string, wait bool)

DeleteNamespaceProject deletes a specified project in kubernetes cluster

func (KubectlRunner) DeletePod

func (kubectl KubectlRunner) DeletePod(podName string, namespace string)

DeletePod deletes a specified pod in the namespace

func (KubectlRunner) EnsureOperatorIsInstalled

func (kubectl KubectlRunner) EnsureOperatorIsInstalled(partialOperatorName string)

func (KubectlRunner) EnsurePodIsUp

func (kubectl KubectlRunner) EnsurePodIsUp(namespace, podName string)

func (KubectlRunner) Exec

func (kubectl KubectlRunner) Exec(podName string, projectName string, args []string, expectedSuccess *bool) (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) GetActiveNamespace

func (kubectl KubectlRunner) GetActiveNamespace() string

func (KubectlRunner) GetAllNamespaceProjects

func (kubectl KubectlRunner) GetAllNamespaceProjects() []string

func (KubectlRunner) GetAllPVCNames

func (kubectl KubectlRunner) GetAllPVCNames(namespace string) []string

func (KubectlRunner) GetAllPodNames

func (kubectl KubectlRunner) GetAllPodNames(namespace string) []string

GetAllPodNames gets the names of pods in given namespace

func (KubectlRunner) GetAllPodsInNs

func (kubectl KubectlRunner) GetAllPodsInNs(namespace string) string

GetAllPodsInNs gets the list of pods in given namespace. It waits for reasonable amount of time for pods to come up

func (KubectlRunner) GetAnnotationsDeployment

func (kubectl KubectlRunner) GetAnnotationsDeployment(componentName, appName, projectName string) map[string]string

GetAnnotationsDeployment gets the annotations from the deployment belonging to the given component, app and project

func (KubectlRunner) GetBindableKinds

func (kubectl KubectlRunner) GetBindableKinds() (string, string)

func (KubectlRunner) GetContainerEnv

func (kubectl KubectlRunner) GetContainerEnv(podName, containerName, namespace string) string

GetContainerEnv returns the container env in the format name:value\n

func (KubectlRunner) GetEnvFromEntry

func (kubectl KubectlRunner) GetEnvFromEntry(componentName string, appName string, projectName string) string

GetEnvFromEntry returns envFrom entry of the deployment

func (KubectlRunner) GetEnvRefNames

func (kubectl KubectlRunner) GetEnvRefNames(componentName, appName, projectName string) []string

GetEnvRefNames gets the ref values from the envFroms of the deployment belonging to the given data

func (KubectlRunner) GetEnvsDevFileDeployment

func (kubectl KubectlRunner) GetEnvsDevFileDeployment(componentName, appName, projectName string) map[string]string

func (KubectlRunner) GetJobNameByComponent

func (kubectl KubectlRunner) GetJobNameByComponent(compName string, namespace string) string

GetJobNameByComponent executes kubectl command and returns the running job name

func (KubectlRunner) GetLogs

func (kubectl KubectlRunner) GetLogs(podName string) string

func (KubectlRunner) GetNamespaceProject

func (kubectl KubectlRunner) GetNamespaceProject() 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) GetPodInitContainers

func (kubectl KubectlRunner) GetPodInitContainers(compName string, namespace string) []string

GetPodInitContainers executes kubectl command and returns the init containers of the pod

func (KubectlRunner) GetRunningPodNameByComponent

func (kubectl KubectlRunner) GetRunningPodNameByComponent(compName string, namespace string) string

GetRunningPodNameByComponent executes kubectl command and returns the running pod name of a deployed devfile component by passing component name as a argument

func (KubectlRunner) GetSecrets

func (kubectl KubectlRunner) GetSecrets(project string) string

GetSecrets gets all the secrets belonging to the project

func (KubectlRunner) GetServiceBinding

func (kubectl KubectlRunner) GetServiceBinding(name, projectName string) (string, string)

func (KubectlRunner) GetServices

func (kubectl KubectlRunner) GetServices(namespace string) string

GetServices gets services on the cluster

func (KubectlRunner) GetVersion

func (kubectl KubectlRunner) GetVersion() string

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) GetVolumeNamesFromDeployment

func (kubectl KubectlRunner) GetVolumeNamesFromDeployment(componentName, appName, projectName string) map[string]string

GetVolumeNamesFromDeployment gets the volumes from the deployment belonging to the given data

func (KubectlRunner) HasNamespaceProject

func (kubectl KubectlRunner) HasNamespaceProject(name string) bool

func (KubectlRunner) ListNamespaceProject

func (kubectl KubectlRunner) ListNamespaceProject(name string)

func (KubectlRunner) PodsShouldBeRunning

func (kubectl KubectlRunner) PodsShouldBeRunning(project string, regex string)

func (KubectlRunner) Run

func (kubectl KubectlRunner) Run(args ...string) *gexec.Session

Run kubectl with given arguments

func (KubectlRunner) ScalePodToZero

func (kubectl KubectlRunner) ScalePodToZero(componentName, appName, projectName string)

ScalePodToZero scales the pod of the deployment to zero. It waits for the pod to get deleted from the cluster before returning

func (KubectlRunner) SetLabelsOnNamespace

func (kubectl KubectlRunner) SetLabelsOnNamespace(ns string, labelValues ...string)

func (KubectlRunner) SetProject

func (kubectl KubectlRunner) SetProject(namespace string) string

func (KubectlRunner) VerifyResourceDeleted

func (kubectl KubectlRunner) VerifyResourceDeleted(ri ResourceInfo)

VerifyResourceDeleted verifies if the given resource is deleted from cluster.

func (KubectlRunner) VerifyResourceToBeDeleted

func (kubectl KubectlRunner) VerifyResourceToBeDeleted(ri ResourceInfo)

VerifyResourceToBeDeleted verifies if a resource if deleted, or if not, if it is marked for deletion

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

func (KubectlRunner) WaitAndCheckForTerminatingState

func (kubectl KubectlRunner) WaitAndCheckForTerminatingState(resourceType, namespace string, timeoutMinutes int) bool

WaitAndCheckForTerminatingState waits for the given interval and checks if the given resource type has been deleted on the cluster or is in the terminating state

func (KubectlRunner) WaitForRunnerCmdOut

func (kubectl KubectlRunner) WaitForRunnerCmdOut(args []string, timeout int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool

WaitForRunnerCmdOut runs "kubectl" command until it gets the expected output. It accepts 4 arguments 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.

type LogsSession

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

func StartLogsFollow

func StartLogsFollow(podman bool, opts ...string) (LogsSession, []byte, []byte, error)

StartLogsFollow starts a session with `odo logs --follow` It returns a session structure, the contents of the standard and error outputs

func (*LogsSession) Kill

func (o *LogsSession) Kill()

Kill the `odo logs --follow` session

func (*LogsSession) OutContents

func (o *LogsSession) OutContents() []byte

OutContents returns the contents of the session's stdout

type OcRunner

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

func NewOcRunner

func NewOcRunner(ocPath string) OcRunner

NewOcRunner initializes new OcRunner

func (OcRunner) AddSecret

func (oc OcRunner) AddSecret(comvar CommonVar)

AddSecret adds pull-secret to the namespace, for e2e-test

func (OcRunner) AssertContainsLabel

func (oc OcRunner) AssertContainsLabel(kind, namespace, componentName, appName, mode, key, value string)

func (OcRunner) AssertNoContainsLabel

func (oc OcRunner) AssertNoContainsLabel(kind, namespace, componentName, appName, mode, key string)

func (OcRunner) AssertNonAuthenticated

func (oc OcRunner) AssertNonAuthenticated()

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) CreateAndSetRandNamespaceProject

func (oc OcRunner) CreateAndSetRandNamespaceProject() string

CreateAndSetRandNamespaceProject create and set new project

func (OcRunner) CreateAndSetRandNamespaceProjectOfLength

func (oc OcRunner) CreateAndSetRandNamespaceProjectOfLength(i int) string

CreateAndSetRandNamespaceProjectOfLength creates a new project with name of length i and sets it to the current context

func (OcRunner) CreateSecret

func (oc OcRunner) CreateSecret(secretName, secretPass, project string)

CreateSecret takes secret name, password and the namespace where we want to create the specific secret into the cluster

func (OcRunner) DeleteNamespaceProject

func (oc OcRunner) DeleteNamespaceProject(projectName string, wait bool)

DeleteNamespaceProject deletes a specified project in oc cluster

func (OcRunner) DeletePod

func (oc OcRunner) DeletePod(podName string, namespace string)

DeletePod deletes a specified pod in the namespace

func (OcRunner) EnsureOperatorIsInstalled

func (oc OcRunner) EnsureOperatorIsInstalled(partialOperatorName string)

func (OcRunner) EnsurePodIsUp

func (oc OcRunner) EnsurePodIsUp(namespace, podName string)

func (OcRunner) Exec

func (oc OcRunner) Exec(podName string, projectName string, args []string, expectedSuccess *bool) (string, string)

Exec allows generic execution of commands, returning the contents of stdout

func (OcRunner) ExecListDir

func (oc OcRunner) ExecListDir(podName string, projectName string, dir string) string

ExecListDir returns dir list in specified location of pod

func (OcRunner) GetActiveNamespace

func (oc OcRunner) GetActiveNamespace() string

func (OcRunner) GetAllNamespaceProjects

func (oc OcRunner) GetAllNamespaceProjects() []string

func (OcRunner) GetAllPVCNames

func (oc OcRunner) GetAllPVCNames(namespace string) []string

func (OcRunner) GetAllPodNames

func (oc OcRunner) GetAllPodNames(namespace string) []string

GetAllPodNames gets the names of pods in given namespace

func (OcRunner) GetAllPodsInNs

func (oc OcRunner) GetAllPodsInNs(namespace string) string

GetAllPodsInNs gets the list of pods in given namespace. It waits for reasonable amount of time for pods to come up

func (OcRunner) GetAnnotationsDeployment

func (oc OcRunner) GetAnnotationsDeployment(componentName, appName, projectName string) map[string]string

GetAnnotationsDeployment gets the annotations from the deployment belonging to the given component, app and project

func (OcRunner) GetBindableKinds

func (oc OcRunner) GetBindableKinds() (string, string)

func (OcRunner) GetContainerEnv

func (oc OcRunner) GetContainerEnv(podName, containerName, namespace string) string

GetContainerEnv returns the container env in the format name:value\n

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) GetCurrentServerURL

func (oc OcRunner) GetCurrentServerURL() string

GetCurrentServerURL retrieves the URL of the server we're currently connected to returns empty if not connected or an error occurred

func (OcRunner) GetEnvFromEntry

func (oc OcRunner) GetEnvFromEntry(componentName string, appName string, projectName string) string

GetEnvFromEntry returns envFrom entry of the deployment

func (OcRunner) GetEnvRefNames

func (oc OcRunner) GetEnvRefNames(componentName, appName, projectName string) []string

GetEnvRefNames gets the ref values from the envFroms of the deployment belonging to the given data

func (OcRunner) GetEnvsDevFileDeployment

func (oc OcRunner) GetEnvsDevFileDeployment(componentName, appName, projectName string) map[string]string

func (OcRunner) GetJobNameByComponent

func (oc OcRunner) GetJobNameByComponent(compName string, namespace string) string

GetJobNameByComponent executes kubectl command and returns the running job name

func (OcRunner) GetLoginUser

func (oc OcRunner) GetLoginUser() string

GetLoginUser returns current user name

func (OcRunner) GetLogs

func (oc OcRunner) GetLogs(podName string) string

func (OcRunner) GetNamespaceProject

func (oc OcRunner) GetNamespaceProject() string

func (OcRunner) GetPVCSize

func (oc OcRunner) GetPVCSize(compName, storageName, namespace string) string

GetPVCSize executes oc command and returns the bound storage size

func (OcRunner) GetPodInitContainers

func (oc OcRunner) GetPodInitContainers(compName string, namespace string) []string

GetPodInitContainers executes oc command and returns the init containers of the pod

func (OcRunner) GetRoute

func (oc OcRunner) GetRoute(urlName string, appName string) string

GetRoute returns route URL

func (OcRunner) GetRunningPodNameByComponent

func (oc OcRunner) GetRunningPodNameByComponent(compName string, namespace string) string

GetRunningPodNameByComponent executes oc command and returns the running pod name of a deployed devfile component by passing component name as a argument

func (OcRunner) GetRunningPodNameOfComp

func (oc OcRunner) GetRunningPodNameOfComp(compName string, namespace string) string

GetRunningPodNameOfComp executes oc command and returns the running pod name of a deployed component by passing component name as a argument

func (OcRunner) GetSecrets

func (oc OcRunner) GetSecrets(project string) string

GetSecrets gets all the secrets belonging to the project

func (OcRunner) GetServiceBinding

func (oc OcRunner) GetServiceBinding(name, projectName string) (string, string)

func (OcRunner) GetServices

func (oc OcRunner) GetServices(namespace string) string

GetServices gets services on the cluster

func (OcRunner) GetToken

func (oc OcRunner) GetToken() string

GetToken returns current user token

func (OcRunner) GetVersion

func (oc OcRunner) GetVersion() string

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) GetVolumeNamesFromDeployment

func (oc OcRunner) GetVolumeNamesFromDeployment(componentName, appName, projectName string) map[string]string

GetVolumeNamesFromDeployment gets the volumes from the deployment belonging to the given data

func (OcRunner) HasNamespaceProject

func (oc OcRunner) HasNamespaceProject(name string) bool

func (OcRunner) ListNamespaceProject

func (oc OcRunner) ListNamespaceProject(name string)

func (OcRunner) LoginUsingToken

func (oc OcRunner) LoginUsingToken(token string) string

LoginUsingToken returns output after successful login

func (OcRunner) Logout

func (oc OcRunner) Logout()

func (OcRunner) PodsShouldBeRunning

func (oc OcRunner) PodsShouldBeRunning(project string, regex string)

func (OcRunner) Run

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

Run oc with given arguments

func (OcRunner) ScalePodToZero

func (oc OcRunner) ScalePodToZero(componentName, appName, projectName string)

ScalePodToZero scales the pod of the deployment to zero. It waits for the pod to get deleted from the cluster before returning

func (OcRunner) ServiceInstanceStatus

func (oc OcRunner) ServiceInstanceStatus(serviceInstanceName string) string

ServiceInstanceStatus returns service instance

func (OcRunner) SetLabelsOnNamespace

func (oc OcRunner) SetLabelsOnNamespace(ns string, labelValues ...string)

func (OcRunner) SetProject

func (oc OcRunner) SetProject(namespace string) string

func (OcRunner) StatFileInPod

func (oc OcRunner) StatFileInPod(cmpName, appName, project, filepath string) string

StatFileInPod returns stat result of filepath in pod of given component, in a given app, in a given project. It also strips access time information as it vaires accross file systems/kernel configs, and we are not interested in it anyway

func (OcRunner) VerifyResourceDeleted

func (oc OcRunner) VerifyResourceDeleted(ri ResourceInfo)

VerifyResourceDeleted verifies if the given resource is deleted from cluster

func (OcRunner) VerifyResourceToBeDeleted

func (oc OcRunner) VerifyResourceToBeDeleted(ri ResourceInfo)

func (OcRunner) WaitAndCheckForExistence

func (oc OcRunner) WaitAndCheckForExistence(resourceType, namespace string, timeoutMinutes int) bool

WaitAndCheckForExistence wait for the given and checks if the given resource type gets deleted on the cluster

func (OcRunner) WaitAndCheckForTerminatingState

func (oc OcRunner) WaitAndCheckForTerminatingState(resourceType, namespace string, timeoutMinutes int) bool

WaitAndCheckForTerminatingState waits for the given interval and checks if the given resource type has been deleted on the cluster or is in the terminating state

func (OcRunner) WaitForRunnerCmdOut

func (oc OcRunner) WaitForRunnerCmdOut(args []string, timeout int, errOnFail bool, check func(output string) bool, includeStdErr ...bool) bool

WaitForRunnerCmdOut runs "oc" command until it gets the expected output. It accepts 4 arguments 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.

type OdoV2Watch

type OdoV2Watch struct {
    CmpName               string
    StringsToBeMatched    []string
    StringsNotToBeMatched []string
    FolderToCheck         string
    SrcType               string
}

type PodmanComponent

PodmanComponent is an abstraction for a Devfile Component deployed on podman

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

func NewPodmanComponent

func NewPodmanComponent(componentName string, app string) *PodmanComponent

func (*PodmanComponent) Exec

func (o *PodmanComponent) Exec(container string, args []string, expectedSuccess *bool) (string, string)

func (*PodmanComponent) ExpectIsDeployed

func (o *PodmanComponent) ExpectIsDeployed()

func (*PodmanComponent) ExpectIsNotDeployed

func (o *PodmanComponent) ExpectIsNotDeployed()

func (*PodmanComponent) GetAnnotations

func (o *PodmanComponent) GetAnnotations() map[string]string

func (*PodmanComponent) GetEnvVars

func (o *PodmanComponent) GetEnvVars(container string) map[string]string

func (*PodmanComponent) GetJobDef

func (o *PodmanComponent) GetJobDef() *batchv1.Job

func (*PodmanComponent) GetLabels

func (o *PodmanComponent) GetLabels() map[string]string

func (*PodmanComponent) GetPodDef

func (o *PodmanComponent) GetPodDef() *corev1.Pod

func (*PodmanComponent) GetPodLogs

func (o *PodmanComponent) GetPodLogs() string

func (*PodmanComponent) ListImages

func (o *PodmanComponent) ListImages() string

type Registry

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

func NewRegistry

func NewRegistry(url string) Registry

func (Registry) GetIndex

func (o Registry) GetIndex() ([]api.DevfileStack, error)

func (Registry) GetStack

func (o Registry) GetStack(name string) (api.DevfileStack, error)

type RegistryServer

type RegistryServer interface {
    Start() (url string, err error)
    Stop() error
    IsStarted() bool
    GetUrl() string
}

type ResourceInfo

type ResourceInfo struct {
    ResourceType string
    ResourceName string
    Namespace    string
}

type Tester

Tester represents the function that contains all steps to test the given interactive command. The InteractiveContext argument needs to be passed to the various helper.SendLine and helper.ExpectString methods.

type Tester func(InteractiveContext)

Subdirectories

Name Synopsis
..
registry_server
reporter