common

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCLI

func ExecCLI(cmd *cobra.Command, buffer *bytes.Buffer, log *log.Entry, expectValidationErr bool) (tr *test.TestResult)

ExecCLI executes the given cobra command and returns a test result.

func InitCmd

func InitCmd(args []string) (*cobra.Command, *bytes.Buffer)

InitCmd initializes a new cobra command with the given arguments and returns the command and a buffer to capture the output.

Types

type ExecuteRequisite

type ExecuteRequisite func(testCtx *test.TestContext) error

func PreRequisiteFun

func PreRequisiteFun() ExecuteRequisite

func TearDownFun

func TearDownFun() ExecuteRequisite

type SingleFuncTestCase

type SingleFuncTestCase struct {
	*test.BaseTest
	// contains filtered or unexported fields
}

func NewSingleFuncTest

func NewSingleFuncTest(name string, testFunc func(*test.TestContext) error) *SingleFuncTestCase

func (*SingleFuncTestCase) Execute

func (r *SingleFuncTestCase) Execute(ctx *test.TestContext) (tr *test.TestResult)

func (*SingleFuncTestCase) TearDown

func (r *SingleFuncTestCase) TearDown(ctx *test.TestContext)

Jump to

Keyboard shortcuts

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