testutils

package
v0.0.0-...-01a409d Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const JobStatusLabel = "job_status"
View Source
const WfIdLabel = "wf_id"

Variables

This section is empty.

Functions

func FakeQueueData

func FakeQueueData(size int) []*github.WorkflowRun

Types

type ClientMock

type ClientMock struct {
	mock.Mock
	QueueLength              int
	Delay                    time.Duration
	State                    state.ClientState
	RecordGetWorkQueueLength bool
	RecordRefreshAccessToken bool
	ErrorOnGetQueuedJobs     bool
}

func (*ClientMock) GetQueuedJobs

func (c *ClientMock) GetQueuedJobs(ctx context.Context) ([]*github.WorkflowRun, error)

func (*ClientMock) GetRemainingCreditsForToken

func (c *ClientMock) GetRemainingCreditsForToken(ctx context.Context) (string, string, int, error)

func (*ClientMock) GetState

func (c *ClientMock) GetState(name string) *state.ClientState

func (*ClientMock) GetWorkflowData

func (c *ClientMock) GetWorkflowData(ctx context.Context) (*map[int64]utils.WorkflowInfo, error)

func (*ClientMock) SaveState

func (c *ClientMock) SaveState(state *state.ClientState)

Jump to

Keyboard shortcuts

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