Documentation ¶
Index ¶
- Variables
- type MockQueue
- func (m *MockQueue) CancelTask(taskID string) (*queue.TaskStatusResponse, error)
- func (m *MockQueue) ClaimTask(taskID, runID string, payload *queue.TaskClaimRequest) (*queue.TaskClaimResponse, error)
- func (m *MockQueue) CreateArtifact(taskID, runID, name string, payload *queue.PostArtifactRequest) (*queue.PostArtifactResponse, error)
- func (m *MockQueue) PollTaskUrls(provisionerID, workerType string) (*queue.PollTaskUrlsResponse, error)
- func (m *MockQueue) ReclaimTask(taskID, runID string) (*queue.TaskReclaimResponse, error)
- func (m *MockQueue) ReportCompleted(taskID, runID string) (*queue.TaskStatusResponse, error)
- func (m *MockQueue) ReportException(taskID, runID string, payload *queue.TaskExceptionRequest) (*queue.TaskStatusResponse, error)
- func (m *MockQueue) ReportFailed(taskID, runID string) (*queue.TaskStatusResponse, error)
- type Queue
Constants ¶
This section is empty.
Variables ¶
View Source
var AnyPostArtifactRequest = mock.MatchedBy(func(i interface{}) bool { _, ok := i.(*queue.PostArtifactRequest) return ok })
Functions ¶
This section is empty.
Types ¶
type MockQueue ¶
MockQueue is a mocked TaskCluster queue client. Calls to methods exposed by the queue client will be recorded for assertion later and will respond with the data that was specified during creation of the mocked object.
For more information about each of these client methods, consult the taskcluster-clieng-go/queue package
func (*MockQueue) CancelTask ¶
func (m *MockQueue) CancelTask(taskID string) (*queue.TaskStatusResponse, error)
func (*MockQueue) ClaimTask ¶
func (m *MockQueue) ClaimTask(taskID, runID string, payload *queue.TaskClaimRequest) (*queue.TaskClaimResponse, error)
func (*MockQueue) CreateArtifact ¶
func (m *MockQueue) CreateArtifact(taskID, runID, name string, payload *queue.PostArtifactRequest) (*queue.PostArtifactResponse, error)
func (*MockQueue) PollTaskUrls ¶
func (m *MockQueue) PollTaskUrls(provisionerID, workerType string) (*queue.PollTaskUrlsResponse, error)
func (*MockQueue) ReclaimTask ¶
func (m *MockQueue) ReclaimTask(taskID, runID string) (*queue.TaskReclaimResponse, error)
func (*MockQueue) ReportCompleted ¶
func (m *MockQueue) ReportCompleted(taskID, runID string) (*queue.TaskStatusResponse, error)
func (*MockQueue) ReportException ¶
func (m *MockQueue) ReportException(taskID, runID string, payload *queue.TaskExceptionRequest) (*queue.TaskStatusResponse, error)
func (*MockQueue) ReportFailed ¶
func (m *MockQueue) ReportFailed(taskID, runID string) (*queue.TaskStatusResponse, error)
type Queue ¶
type Queue interface { ReportCompleted(string, string) (*queue.TaskStatusResponse, error) ReportException(string, string, *queue.TaskExceptionRequest) (*queue.TaskStatusResponse, error) ReportFailed(string, string) (*queue.TaskStatusResponse, error) ClaimTask(string, string, *queue.TaskClaimRequest) (*queue.TaskClaimResponse, error) ReclaimTask(string, string) (*queue.TaskReclaimResponse, error) PollTaskUrls(string, string) (*queue.PollTaskUrlsResponse, error) CancelTask(string) (*queue.TaskStatusResponse, error) CreateArtifact(string, string, string, *queue.PostArtifactRequest) (*queue.PostArtifactResponse, error) }
Queue is an interface to the Queue client provided by the taskcluster-client-go package. Passing around an interface allows the queue client to be mocked
Click to show internal directories.
Click to hide internal directories.