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

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