mocks

package
v1.405.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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 Artifact

type Artifact struct {
	mock.Mock
}

Artifact is an autogenerated mock type for the Artifact type

func NewArtifact added in v1.366.0

func NewArtifact(t interface {
	mock.TestingT
	Cleanup(func())
}) *Artifact

NewArtifact creates a new instance of Artifact. 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 (*Artifact) EXPECT added in v1.366.0

func (_m *Artifact) EXPECT() *Artifact_Expecter

func (*Artifact) FileName

func (_m *Artifact) FileName() string

FileName provides a mock function with given fields:

func (*Artifact) GetData

func (_m *Artifact) GetData(ctx context.Context) ([]byte, error)

GetData provides a mock function with given fields: ctx

func (*Artifact) Save added in v1.111.0

func (_m *Artifact) Save(ctx context.Context, path string) (bool, error)

Save provides a mock function with given fields: ctx, path

func (*Artifact) SaveToDir

func (_m *Artifact) SaveToDir(ctx context.Context, dir string) (bool, error)

SaveToDir provides a mock function with given fields: ctx, dir

type Artifact_Expecter added in v1.366.0

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

func (*Artifact_Expecter) FileName added in v1.366.0

func (_e *Artifact_Expecter) FileName() *Artifact_FileName_Call

FileName is a helper method to define mock.On call

func (*Artifact_Expecter) GetData added in v1.366.0

func (_e *Artifact_Expecter) GetData(ctx interface{}) *Artifact_GetData_Call

GetData is a helper method to define mock.On call

  • ctx context.Context

func (*Artifact_Expecter) Save added in v1.366.0

func (_e *Artifact_Expecter) Save(ctx interface{}, path interface{}) *Artifact_Save_Call

Save is a helper method to define mock.On call

  • ctx context.Context
  • path string

func (*Artifact_Expecter) SaveToDir added in v1.366.0

func (_e *Artifact_Expecter) SaveToDir(ctx interface{}, dir interface{}) *Artifact_SaveToDir_Call

SaveToDir is a helper method to define mock.On call

  • ctx context.Context
  • dir string

type Artifact_FileName_Call added in v1.366.0

type Artifact_FileName_Call struct {
	*mock.Call
}

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

func (*Artifact_FileName_Call) Return added in v1.366.0

func (*Artifact_FileName_Call) Run added in v1.366.0

func (_c *Artifact_FileName_Call) Run(run func()) *Artifact_FileName_Call

func (*Artifact_FileName_Call) RunAndReturn added in v1.366.0

func (_c *Artifact_FileName_Call) RunAndReturn(run func() string) *Artifact_FileName_Call

type Artifact_GetData_Call added in v1.366.0

type Artifact_GetData_Call struct {
	*mock.Call
}

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

func (*Artifact_GetData_Call) Return added in v1.366.0

func (_c *Artifact_GetData_Call) Return(_a0 []byte, _a1 error) *Artifact_GetData_Call

func (*Artifact_GetData_Call) Run added in v1.366.0

func (*Artifact_GetData_Call) RunAndReturn added in v1.366.0

func (_c *Artifact_GetData_Call) RunAndReturn(run func(context.Context) ([]byte, error)) *Artifact_GetData_Call

type Artifact_SaveToDir_Call added in v1.366.0

type Artifact_SaveToDir_Call struct {
	*mock.Call
}

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

func (*Artifact_SaveToDir_Call) Return added in v1.366.0

func (*Artifact_SaveToDir_Call) Run added in v1.366.0

func (*Artifact_SaveToDir_Call) RunAndReturn added in v1.366.0

type Artifact_Save_Call added in v1.366.0

type Artifact_Save_Call struct {
	*mock.Call
}

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

func (*Artifact_Save_Call) Return added in v1.366.0

func (_c *Artifact_Save_Call) Return(_a0 bool, _a1 error) *Artifact_Save_Call

func (*Artifact_Save_Call) Run added in v1.366.0

func (_c *Artifact_Save_Call) Run(run func(ctx context.Context, path string)) *Artifact_Save_Call

func (*Artifact_Save_Call) RunAndReturn added in v1.366.0

func (_c *Artifact_Save_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *Artifact_Save_Call

type Build

type Build struct {
	mock.Mock
}

Build is an autogenerated mock type for the Build type

func NewBuild added in v1.366.0

func NewBuild(t interface {
	mock.TestingT
	Cleanup(func())
}) *Build

NewBuild creates a new instance of Build. 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 (*Build) EXPECT added in v1.366.0

func (_m *Build) EXPECT() *Build_Expecter

func (*Build) GetArtifacts

func (_m *Build) GetArtifacts() []gojenkins.Artifact

GetArtifacts provides a mock function with given fields:

func (*Build) IsRunning

func (_m *Build) IsRunning(ctx context.Context) bool

IsRunning provides a mock function with given fields: ctx

func (*Build) Poll added in v1.255.0

func (_m *Build) Poll(ctx context.Context, options ...interface{}) (int, error)

Poll provides a mock function with given fields: ctx, options

type Build_Expecter added in v1.366.0

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

func (*Build_Expecter) GetArtifacts added in v1.366.0

func (_e *Build_Expecter) GetArtifacts() *Build_GetArtifacts_Call

GetArtifacts is a helper method to define mock.On call

func (*Build_Expecter) IsRunning added in v1.366.0

func (_e *Build_Expecter) IsRunning(ctx interface{}) *Build_IsRunning_Call

IsRunning is a helper method to define mock.On call

  • ctx context.Context

func (*Build_Expecter) Poll added in v1.366.0

func (_e *Build_Expecter) Poll(ctx interface{}, options ...interface{}) *Build_Poll_Call

Poll is a helper method to define mock.On call

  • ctx context.Context
  • options ...interface{}

type Build_GetArtifacts_Call added in v1.366.0

type Build_GetArtifacts_Call struct {
	*mock.Call
}

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

func (*Build_GetArtifacts_Call) Return added in v1.366.0

func (*Build_GetArtifacts_Call) Run added in v1.366.0

func (_c *Build_GetArtifacts_Call) Run(run func()) *Build_GetArtifacts_Call

func (*Build_GetArtifacts_Call) RunAndReturn added in v1.366.0

func (_c *Build_GetArtifacts_Call) RunAndReturn(run func() []gojenkins.Artifact) *Build_GetArtifacts_Call

type Build_IsRunning_Call added in v1.366.0

type Build_IsRunning_Call struct {
	*mock.Call
}

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

func (*Build_IsRunning_Call) Return added in v1.366.0

func (*Build_IsRunning_Call) Run added in v1.366.0

func (_c *Build_IsRunning_Call) Run(run func(ctx context.Context)) *Build_IsRunning_Call

func (*Build_IsRunning_Call) RunAndReturn added in v1.366.0

func (_c *Build_IsRunning_Call) RunAndReturn(run func(context.Context) bool) *Build_IsRunning_Call

type Build_Poll_Call added in v1.366.0

type Build_Poll_Call struct {
	*mock.Call
}

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

func (*Build_Poll_Call) Return added in v1.366.0

func (_c *Build_Poll_Call) Return(_a0 int, _a1 error) *Build_Poll_Call

func (*Build_Poll_Call) Run added in v1.366.0

func (_c *Build_Poll_Call) Run(run func(ctx context.Context, options ...interface{})) *Build_Poll_Call

func (*Build_Poll_Call) RunAndReturn added in v1.366.0

func (_c *Build_Poll_Call) RunAndReturn(run func(context.Context, ...interface{}) (int, error)) *Build_Poll_Call

type CredentialsManager added in v1.108.0

type CredentialsManager struct {
	mock.Mock
}

CredentialsManager is an autogenerated mock type for the CredentialsManager type

func NewCredentialsManager added in v1.366.0

func NewCredentialsManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *CredentialsManager

NewCredentialsManager creates a new instance of CredentialsManager. 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 (*CredentialsManager) EXPECT added in v1.366.0

func (*CredentialsManager) Update added in v1.108.0

func (_m *CredentialsManager) Update(_a0 context.Context, _a1 string, _a2 string, _a3 interface{}) error

Update provides a mock function with given fields: _a0, _a1, _a2, _a3

type CredentialsManager_Expecter added in v1.366.0

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

func (*CredentialsManager_Expecter) Update added in v1.366.0

func (_e *CredentialsManager_Expecter) Update(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}) *CredentialsManager_Update_Call

Update is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 string
  • _a3 interface{}

type CredentialsManager_Update_Call added in v1.366.0

type CredentialsManager_Update_Call struct {
	*mock.Call
}

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

func (*CredentialsManager_Update_Call) Return added in v1.366.0

func (*CredentialsManager_Update_Call) Run added in v1.366.0

func (_c *CredentialsManager_Update_Call) Run(run func(_a0 context.Context, _a1 string, _a2 string, _a3 interface{})) *CredentialsManager_Update_Call

func (*CredentialsManager_Update_Call) RunAndReturn added in v1.366.0

type Jenkins

type Jenkins struct {
	mock.Mock
}

Jenkins is an autogenerated mock type for the Jenkins type

func NewJenkins added in v1.366.0

func NewJenkins(t interface {
	mock.TestingT
	Cleanup(func())
}) *Jenkins

NewJenkins creates a new instance of Jenkins. 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 (*Jenkins) BuildJob

func (_m *Jenkins) BuildJob(ctx context.Context, name string, params map[string]string) (int64, error)

BuildJob provides a mock function with given fields: ctx, name, params

func (*Jenkins) EXPECT added in v1.366.0

func (_m *Jenkins) EXPECT() *Jenkins_Expecter

func (*Jenkins) GetBuildFromQueueID added in v1.145.0

func (_m *Jenkins) GetBuildFromQueueID(ctx context.Context, job *gojenkins.Job, queueid int64) (*gojenkins.Build, error)

GetBuildFromQueueID provides a mock function with given fields: ctx, job, queueid

func (*Jenkins) GetJobObj added in v1.146.0

func (_m *Jenkins) GetJobObj(ctx context.Context, name string) *gojenkins.Job

GetJobObj provides a mock function with given fields: ctx, name

type Jenkins_BuildJob_Call added in v1.366.0

type Jenkins_BuildJob_Call struct {
	*mock.Call
}

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

func (*Jenkins_BuildJob_Call) Return added in v1.366.0

func (*Jenkins_BuildJob_Call) Run added in v1.366.0

func (_c *Jenkins_BuildJob_Call) Run(run func(ctx context.Context, name string, params map[string]string)) *Jenkins_BuildJob_Call

func (*Jenkins_BuildJob_Call) RunAndReturn added in v1.366.0

type Jenkins_Expecter added in v1.366.0

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

func (*Jenkins_Expecter) BuildJob added in v1.366.0

func (_e *Jenkins_Expecter) BuildJob(ctx interface{}, name interface{}, params interface{}) *Jenkins_BuildJob_Call

BuildJob is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • params map[string]string

func (*Jenkins_Expecter) GetBuildFromQueueID added in v1.366.0

func (_e *Jenkins_Expecter) GetBuildFromQueueID(ctx interface{}, job interface{}, queueid interface{}) *Jenkins_GetBuildFromQueueID_Call

GetBuildFromQueueID is a helper method to define mock.On call

  • ctx context.Context
  • job *gojenkins.Job
  • queueid int64

func (*Jenkins_Expecter) GetJobObj added in v1.366.0

func (_e *Jenkins_Expecter) GetJobObj(ctx interface{}, name interface{}) *Jenkins_GetJobObj_Call

GetJobObj is a helper method to define mock.On call

  • ctx context.Context
  • name string

type Jenkins_GetBuildFromQueueID_Call added in v1.366.0

type Jenkins_GetBuildFromQueueID_Call struct {
	*mock.Call
}

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

func (*Jenkins_GetBuildFromQueueID_Call) Return added in v1.366.0

func (*Jenkins_GetBuildFromQueueID_Call) Run added in v1.366.0

func (*Jenkins_GetBuildFromQueueID_Call) RunAndReturn added in v1.366.0

type Jenkins_GetJobObj_Call added in v1.366.0

type Jenkins_GetJobObj_Call struct {
	*mock.Call
}

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

func (*Jenkins_GetJobObj_Call) Return added in v1.366.0

func (*Jenkins_GetJobObj_Call) Run added in v1.366.0

func (_c *Jenkins_GetJobObj_Call) Run(run func(ctx context.Context, name string)) *Jenkins_GetJobObj_Call

func (*Jenkins_GetJobObj_Call) RunAndReturn added in v1.366.0

type Job added in v1.146.0

type Job struct {
	mock.Mock
}

Job is an autogenerated mock type for the Job type

func NewJob added in v1.366.0

func NewJob(t interface {
	mock.TestingT
	Cleanup(func())
}) *Job

NewJob creates a new instance of Job. 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 (*Job) EXPECT added in v1.366.0

func (_m *Job) EXPECT() *Job_Expecter

func (*Job) GetJob added in v1.146.0

func (_m *Job) GetJob() *gojenkins.Job

GetJob provides a mock function with given fields:

func (*Job) InvokeSimple added in v1.146.0

func (_m *Job) InvokeSimple(ctx context.Context, params map[string]string) (int64, error)

InvokeSimple provides a mock function with given fields: ctx, params

func (*Job) Poll added in v1.146.0

func (_m *Job) Poll(_a0 context.Context) (int, error)

Poll provides a mock function with given fields: _a0

type Job_Expecter added in v1.366.0

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

func (*Job_Expecter) GetJob added in v1.366.0

func (_e *Job_Expecter) GetJob() *Job_GetJob_Call

GetJob is a helper method to define mock.On call

func (*Job_Expecter) InvokeSimple added in v1.366.0

func (_e *Job_Expecter) InvokeSimple(ctx interface{}, params interface{}) *Job_InvokeSimple_Call

InvokeSimple is a helper method to define mock.On call

  • ctx context.Context
  • params map[string]string

func (*Job_Expecter) Poll added in v1.366.0

func (_e *Job_Expecter) Poll(_a0 interface{}) *Job_Poll_Call

Poll is a helper method to define mock.On call

  • _a0 context.Context

type Job_GetJob_Call added in v1.366.0

type Job_GetJob_Call struct {
	*mock.Call
}

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

func (*Job_GetJob_Call) Return added in v1.366.0

func (_c *Job_GetJob_Call) Return(_a0 *gojenkins.Job) *Job_GetJob_Call

func (*Job_GetJob_Call) Run added in v1.366.0

func (_c *Job_GetJob_Call) Run(run func()) *Job_GetJob_Call

func (*Job_GetJob_Call) RunAndReturn added in v1.366.0

func (_c *Job_GetJob_Call) RunAndReturn(run func() *gojenkins.Job) *Job_GetJob_Call

type Job_InvokeSimple_Call added in v1.366.0

type Job_InvokeSimple_Call struct {
	*mock.Call
}

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

func (*Job_InvokeSimple_Call) Return added in v1.366.0

func (*Job_InvokeSimple_Call) Run added in v1.366.0

func (_c *Job_InvokeSimple_Call) Run(run func(ctx context.Context, params map[string]string)) *Job_InvokeSimple_Call

func (*Job_InvokeSimple_Call) RunAndReturn added in v1.366.0

func (_c *Job_InvokeSimple_Call) RunAndReturn(run func(context.Context, map[string]string) (int64, error)) *Job_InvokeSimple_Call

type Job_Poll_Call added in v1.366.0

type Job_Poll_Call struct {
	*mock.Call
}

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

func (*Job_Poll_Call) Return added in v1.366.0

func (_c *Job_Poll_Call) Return(_a0 int, _a1 error) *Job_Poll_Call

func (*Job_Poll_Call) Run added in v1.366.0

func (_c *Job_Poll_Call) Run(run func(_a0 context.Context)) *Job_Poll_Call

func (*Job_Poll_Call) RunAndReturn added in v1.366.0

func (_c *Job_Poll_Call) RunAndReturn(run func(context.Context) (int, error)) *Job_Poll_Call

type Task

type Task struct {
	mock.Mock
}

Task is an autogenerated mock type for the Task type

func NewTask added in v1.366.0

func NewTask(t interface {
	mock.TestingT
	Cleanup(func())
}) *Task

NewTask creates a new instance of Task. 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 (*Task) BuildNumber

func (_m *Task) BuildNumber() (int64, error)

BuildNumber provides a mock function with given fields:

func (*Task) EXPECT added in v1.366.0

func (_m *Task) EXPECT() *Task_Expecter

func (*Task) HasStarted

func (_m *Task) HasStarted() bool

HasStarted provides a mock function with given fields:

func (*Task) Poll

func (_m *Task) Poll(_a0 context.Context) (int, error)

Poll provides a mock function with given fields: _a0

func (*Task) WaitToStart

func (_m *Task) WaitToStart(ctx context.Context, pollInterval time.Duration) (int64, error)

WaitToStart provides a mock function with given fields: ctx, pollInterval

type Task_BuildNumber_Call added in v1.366.0

type Task_BuildNumber_Call struct {
	*mock.Call
}

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

func (*Task_BuildNumber_Call) Return added in v1.366.0

func (*Task_BuildNumber_Call) Run added in v1.366.0

func (_c *Task_BuildNumber_Call) Run(run func()) *Task_BuildNumber_Call

func (*Task_BuildNumber_Call) RunAndReturn added in v1.366.0

func (_c *Task_BuildNumber_Call) RunAndReturn(run func() (int64, error)) *Task_BuildNumber_Call

type Task_Expecter added in v1.366.0

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

func (*Task_Expecter) BuildNumber added in v1.366.0

func (_e *Task_Expecter) BuildNumber() *Task_BuildNumber_Call

BuildNumber is a helper method to define mock.On call

func (*Task_Expecter) HasStarted added in v1.366.0

func (_e *Task_Expecter) HasStarted() *Task_HasStarted_Call

HasStarted is a helper method to define mock.On call

func (*Task_Expecter) Poll added in v1.366.0

func (_e *Task_Expecter) Poll(_a0 interface{}) *Task_Poll_Call

Poll is a helper method to define mock.On call

  • _a0 context.Context

func (*Task_Expecter) WaitToStart added in v1.366.0

func (_e *Task_Expecter) WaitToStart(ctx interface{}, pollInterval interface{}) *Task_WaitToStart_Call

WaitToStart is a helper method to define mock.On call

  • ctx context.Context
  • pollInterval time.Duration

type Task_HasStarted_Call added in v1.366.0

type Task_HasStarted_Call struct {
	*mock.Call
}

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

func (*Task_HasStarted_Call) Return added in v1.366.0

func (*Task_HasStarted_Call) Run added in v1.366.0

func (_c *Task_HasStarted_Call) Run(run func()) *Task_HasStarted_Call

func (*Task_HasStarted_Call) RunAndReturn added in v1.366.0

func (_c *Task_HasStarted_Call) RunAndReturn(run func() bool) *Task_HasStarted_Call

type Task_Poll_Call added in v1.366.0

type Task_Poll_Call struct {
	*mock.Call
}

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

func (*Task_Poll_Call) Return added in v1.366.0

func (_c *Task_Poll_Call) Return(_a0 int, _a1 error) *Task_Poll_Call

func (*Task_Poll_Call) Run added in v1.366.0

func (_c *Task_Poll_Call) Run(run func(_a0 context.Context)) *Task_Poll_Call

func (*Task_Poll_Call) RunAndReturn added in v1.366.0

func (_c *Task_Poll_Call) RunAndReturn(run func(context.Context) (int, error)) *Task_Poll_Call

type Task_WaitToStart_Call added in v1.366.0

type Task_WaitToStart_Call struct {
	*mock.Call
}

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

func (*Task_WaitToStart_Call) Return added in v1.366.0

func (*Task_WaitToStart_Call) Run added in v1.366.0

func (_c *Task_WaitToStart_Call) Run(run func(ctx context.Context, pollInterval time.Duration)) *Task_WaitToStart_Call

func (*Task_WaitToStart_Call) RunAndReturn added in v1.366.0

Jump to

Keyboard shortcuts

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