cli

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubectl

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

Kubectl type

func NewKubectl

func NewKubectl(namespace string) Kubectl

New Kubectl object

func (Kubectl) Assert

func (k Kubectl) Assert(t *testing.T, exp icmd.Expected, args ...string) *icmd.Result

Assert runs a command and verifies against expected

func (Kubectl) MustSucceed

func (k Kubectl) MustSucceed(t *testing.T, args ...string) *icmd.Result

MustSucceed asserts that the command ran with 0 exit code

func (Kubectl) Run

func (k Kubectl) Run(t *testing.T, args ...string) *icmd.Result

Run will help you execute kubectl command on a specific namespace, with a timeout

func (Kubectl) RunNoNamespace

func (k Kubectl) RunNoNamespace(t *testing.T, args ...string) *icmd.Result

RunNoNamespace will help you execute kubectl command without namespace, with a timeout

type Prompt

type Prompt struct {
	CmdArgs   []string
	Procedure func(*goexpect.Console) error
}

Prompt provides test utility for prompt test.

type TknRunner

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

TknRunner contains information about the current test execution tkn binary path under test

func NewTknRunner

func NewTknRunner(namespace string) (TknRunner, error)

NewTknRunner returns details about the tkn on particular namespace

func (TknRunner) Assert

func (e TknRunner) Assert(t *testing.T, exp icmd.Expected, args ...string) *icmd.Result

Assert runs a command and verifies exit code (0)

func (TknRunner) CheckVersion

func (e TknRunner) CheckVersion(t *testing.T, component string, version string) bool

TODO: Re-write this to just get the version of Tekton components through tkn version as described in https://github.com/tektoncd/cli/issues/1067

func (TknRunner) MustSucceed

func (e TknRunner) MustSucceed(t *testing.T, args ...string) *icmd.Result

MustSucceed asserts that the command ran with 0 exit code

func (TknRunner) Path

func (e TknRunner) Path() string

Path returns the tkn binary path

func (TknRunner) Run

func (e TknRunner) Run(t *testing.T, args ...string) *icmd.Result

Run will help you execute tkn command on a specific namespace, with a timeout

func (TknRunner) RunInteractiveTests

func (e TknRunner) RunInteractiveTests(t *testing.T, ops *Prompt) *expect.Console

RunInteractiveTests helps to run interactive tests.

func (TknRunner) RunNoNamespace

func (e TknRunner) RunNoNamespace(t *testing.T, args ...string) *icmd.Result

RunNoNamespace will help you execute tkn command without namespace, with a timeout

func (TknRunner) RunWithOption

func (e TknRunner) RunWithOption(t *testing.T, option icmd.CmdOp, args ...string) *icmd.Result

RunWithOption will help you execute tkn command with namespace, cmd option

func (TknRunner) TknNamespace

func (e TknRunner) TknNamespace() string

TknNamespace returns the current Namespace

Jump to

Keyboard shortcuts

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