cmdtesting

package
v1.3.1-rc1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSuite

type BaseSuite struct {
	suite.Suite
	Node     *node.Node
	Client   *client.APIClient
	ClientV2 clientv2.API
	Host     string
	Port     uint16
}

func (*BaseSuite) ExecuteTestCobraCommand added in v1.2.1

func (s *BaseSuite) ExecuteTestCobraCommand(args ...string) (c *cobra.Command, output string, err error)

ExecuteTestCobraCommand executes a cobra command with the given arguments. The api-host and api-port flags are automatically added if they are not provided in `args`. They are set to the values of `s.Host` and `s.Port` respectively.

func (*BaseSuite) ExecuteTestCobraCommandWithStdin added in v1.2.1

func (s *BaseSuite) ExecuteTestCobraCommandWithStdin(stdin io.Reader, args ...string) (c *cobra.Command, output string, err error)

ExecuteTestCobraCommandWithStdin executes a cobra command with the given arguments and with a specific stdin. The api-host and api-port flags are automatically added if they are not provided in `args`. They are set to the values of `s.Host` and `s.Port` respectively.

func (*BaseSuite) ExecuteTestCobraCommandWithStdinBytes added in v1.2.1

func (s *BaseSuite) ExecuteTestCobraCommandWithStdinBytes(stdin []byte, args ...string) (c *cobra.Command, output string, err error)

ExecuteTestCobraCommandWithStdinBytes executes a cobra command with the given arguments and with a specific stdin bytes. The api-host and api-port flags are automatically added if they are not provided in `args`. They are set to the values of `s.Host` and `s.Port` respectively.

func (*BaseSuite) SetupTest

func (s *BaseSuite) SetupTest()

before each test

func (*BaseSuite) TearDownTest

func (s *BaseSuite) TearDownTest()

After each test

type BaseTLSSuite added in v1.2.2

type BaseTLSSuite struct {
	BaseSuite
	TempCACertFilePath string
}

func (*BaseTLSSuite) SetupTest added in v1.2.2

func (s *BaseTLSSuite) SetupTest()

before each test

func (*BaseTLSSuite) TearDownTest added in v1.2.2

func (s *BaseTLSSuite) TearDownTest()

After each test

Jump to

Keyboard shortcuts

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