mocks

package
v1.4.0-rc.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	mock.Mock
}

Executor is an autogenerated mock type for the Executor type

func NewExecutor

func NewExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *Executor

NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Executor) EXPECT

func (_m *Executor) EXPECT() *Executor_Expecter

func (*Executor) Exec

func (_m *Executor) Exec(ctx context.Context, config *rest.Config, podName string, podNamespace string, containerName string, command []string) (*bytes.Buffer, *bytes.Buffer, error)

Exec provides a mock function with given fields: ctx, config, podName, podNamespace, containerName, command

type Executor_Exec_Call

type Executor_Exec_Call struct {
	*mock.Call
}

Executor_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'

func (*Executor_Exec_Call) Return

func (_c *Executor_Exec_Call) Return(stdOut *bytes.Buffer, stdErr *bytes.Buffer, err error) *Executor_Exec_Call

func (*Executor_Exec_Call) Run

func (_c *Executor_Exec_Call) Run(run func(ctx context.Context, config *rest.Config, podName string, podNamespace string, containerName string, command []string)) *Executor_Exec_Call

func (*Executor_Exec_Call) RunAndReturn

type Executor_Expecter

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

func (*Executor_Expecter) Exec

func (_e *Executor_Expecter) Exec(ctx interface{}, config interface{}, podName interface{}, podNamespace interface{}, containerName interface{}, command interface{}) *Executor_Exec_Call

Exec is a helper method to define mock.On call

  • ctx context.Context
  • config *rest.Config
  • podName string
  • podNamespace string
  • containerName string
  • command []string

Jump to

Keyboard shortcuts

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