mocks

package
v0.0.0-...-2887efe Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobCache

type JobCache struct {
	mock.Mock
}

JobCache is an autogenerated mock type for the JobCache type

func NewJobCache

func NewJobCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *JobCache

NewJobCache creates a new instance of JobCache. 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 (*JobCache) AddJobs

func (_m *JobCache) AddJobs(_a0 []*types.Job)

AddJobs provides a mock function with given fields: _a0

func (*JobCache) GetAllCachedJobs

func (_m *JobCache) GetAllCachedJobs() []*types.Job

GetAllCachedJobs provides a mock function with given fields:

func (*JobCache) GetJob

func (_m *JobCache) GetJob(_a0 string) (*types.Job, error)

GetJob provides a mock function with given fields: _a0

func (*JobCache) GetJobMaybeExpired

func (_m *JobCache) GetJobMaybeExpired(_a0 context.Context, _a1 string) (*types.Job, error)

GetJobMaybeExpired provides a mock function with given fields: _a0, _a1

func (*JobCache) GetJobsByRepoState

func (_m *JobCache) GetJobsByRepoState(_a0 string, _a1 types.RepoState) ([]*types.Job, error)

GetJobsByRepoState provides a mock function with given fields: _a0, _a1

func (*JobCache) GetJobsFromDateRange

func (_m *JobCache) GetJobsFromDateRange(_a0 time.Time, _a1 time.Time) ([]*types.Job, error)

GetJobsFromDateRange provides a mock function with given fields: _a0, _a1

func (*JobCache) GetMatchingJobsFromDateRange

func (_m *JobCache) GetMatchingJobsFromDateRange(names []string, from time.Time, to time.Time) (map[string][]*types.Job, error)

GetMatchingJobsFromDateRange provides a mock function with given fields: names, from, to

func (*JobCache) InProgressJobs

func (_m *JobCache) InProgressJobs() ([]*types.Job, error)

InProgressJobs provides a mock function with given fields:

func (*JobCache) LastUpdated

func (_m *JobCache) LastUpdated() time.Time

LastUpdated provides a mock function with given fields:

func (*JobCache) RequestedJobs

func (_m *JobCache) RequestedJobs() ([]*types.Job, error)

RequestedJobs provides a mock function with given fields:

func (*JobCache) Update

func (_m *JobCache) Update(ctx context.Context) error

Update provides a mock function with given fields: ctx

type TaskCache

type TaskCache struct {
	mock.Mock
}

TaskCache is an autogenerated mock type for the TaskCache type

func NewTaskCache

func NewTaskCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *TaskCache

NewTaskCache creates a new instance of TaskCache. 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 (*TaskCache) AddTasks

func (_m *TaskCache) AddTasks(tasks []*types.Task)

AddTasks provides a mock function with given fields: tasks

func (*TaskCache) GetTask

func (_m *TaskCache) GetTask(id string) (*types.Task, error)

GetTask provides a mock function with given fields: id

func (*TaskCache) GetTaskForCommit

func (_m *TaskCache) GetTaskForCommit(repo string, revision string, name string) (*types.Task, error)

GetTaskForCommit provides a mock function with given fields: repo, revision, name

func (*TaskCache) GetTaskMaybeExpired

func (_m *TaskCache) GetTaskMaybeExpired(_a0 context.Context, _a1 string) (*types.Task, error)

GetTaskMaybeExpired provides a mock function with given fields: _a0, _a1

func (*TaskCache) GetTasksByKey

func (_m *TaskCache) GetTasksByKey(key types.TaskKey) ([]*types.Task, error)

GetTasksByKey provides a mock function with given fields: key

func (*TaskCache) GetTasksForCommits

func (_m *TaskCache) GetTasksForCommits(repo string, commits []string) (map[string]map[string]*types.Task, error)

GetTasksForCommits provides a mock function with given fields: repo, commits

func (*TaskCache) GetTasksFromDateRange

func (_m *TaskCache) GetTasksFromDateRange(from time.Time, to time.Time) ([]*types.Task, error)

GetTasksFromDateRange provides a mock function with given fields: from, to

func (*TaskCache) KnownTaskName

func (_m *TaskCache) KnownTaskName(repo string, name string) bool

KnownTaskName provides a mock function with given fields: repo, name

func (*TaskCache) UnfinishedTasks

func (_m *TaskCache) UnfinishedTasks() ([]*types.Task, error)

UnfinishedTasks provides a mock function with given fields:

func (*TaskCache) Update

func (_m *TaskCache) Update(ctx context.Context) error

Update provides a mock function with given fields: ctx

Jump to

Keyboard shortcuts

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