testclients

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MPL-2.0-no-copyleft-exception Imports: 15 Imported by: ? 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataClient

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

DataClient is the datasvc client

func NewDataClient

func NewDataClient() (*DataClient, error)

NewDataClient returns a new datasvc client with window dressings for tests.

func (*DataClient) Client

func (dc *DataClient) Client() *data.Client

Client returns the underlying client.

func (*DataClient) MakeQueueItem

func (dc *DataClient) MakeQueueItem() (*model.QueueItem, error)

MakeQueueItem returns a queueitem that has already been stored

func (*DataClient) MakeRepo

func (dc *DataClient) MakeRepo(fullRepo, owner string, private bool, forkOf string) error

MakeRepo saves a repo with name, owner, and private state.

func (*DataClient) MakeUser

func (dc *DataClient) MakeUser(username string) (*model.User, error)

MakeUser makes a new user with the name provided. It is given a dummy access token.

type QueueClient

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

QueueClient is the queuesvc client

func NewQueueClient

func NewQueueClient(dc *DataClient) (*QueueClient, error)

NewQueueClient returns a new queuesvc client with window dressings for tests.

func (*QueueClient) Client

func (qc *QueueClient) Client() *queue.Client

Client returns the underlying client.

func (*QueueClient) SetMockSubmissionOnFork

func (qc *QueueClient) SetMockSubmissionOnFork(mock *github.MockClientMockRecorder, sub *types.Submission, parent, resolvedSHA, pathadd string) error

SetMockSubmissionOnFork sets mock submissions for fork-only repositories. Used in a few tests.

func (*QueueClient) SetMockSubmissionSuccess

func (qc *QueueClient) SetMockSubmissionSuccess(mock *github.MockClientMockRecorder, sub *types.Submission, pathadd string) error

SetMockSubmissionSuccess creates all the mock tooling necessary to set up a submission

func (*QueueClient) SetUpSubmissionRepo

func (qc *QueueClient) SetUpSubmissionRepo(name string, forkOf string) error

SetUpSubmissionRepo takes a name of a repo; and configures the submission repo and a user belonging to it. Returns the name of the owner and any error.

Jump to

Keyboard shortcuts

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