Documentation ¶
Index ¶
- type BaseSuite
- func (s *BaseSuite) ExecuteTestCobraCommand(args ...string) (c *cobra.Command, output string, err error)
- func (s *BaseSuite) ExecuteTestCobraCommandWithStdin(stdin io.Reader, args ...string) (c *cobra.Command, output string, err error)
- func (s *BaseSuite) ExecuteTestCobraCommandWithStdinBytes(stdin []byte, args ...string) (c *cobra.Command, output string, err error)
- func (s *BaseSuite) SetupTest()
- func (s *BaseSuite) TearDownTest()
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.Client 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.