mocks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertSlackJson

func AssertSlackJson(t *testing.T, slackClient *SlackClient, event slack.MessageEvent, expected url.Values)

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func (*Client) BuildJob

func (_m *Client) BuildJob(name string, options ...interface{}) (int64, error)

BuildJob provides a mock function with given fields: name, options

func (*Client) GetAllNodes

func (_m *Client) GetAllNodes() ([]*gojenkins.Node, error)

GetAllNodes provides a mock function with given fields:

func (*Client) GetJob

func (_m *Client) GetJob(id string, parentIDs ...string) (*gojenkins.Job, error)

GetJob provides a mock function with given fields: id, parentIDs

func (*Client) GetQueue

func (_m *Client) GetQueue() (*gojenkins.Queue, error)

GetQueue provides a mock function with given fields:

type Job

type Job struct {
	mock.Mock
}

Job is an autogenerated mock type for the Job type

func (*Job) GetBuild

func (_m *Job) GetBuild(id int64) (*gojenkins.Build, error)

GetBuild provides a mock function with given fields: id

func (*Job) GetLastBuild

func (_m *Job) GetLastBuild() (*gojenkins.Build, error)

GetLastBuild provides a mock function with given fields:

func (*Job) Poll

func (_m *Job) Poll() (int, error)

Poll provides a mock function with given fields:

type SlackClient

type SlackClient struct {
	mock.Mock
}

SlackClient is an autogenerated mock type for the SlackClient type

func (*SlackClient) AddReaction

func (_m *SlackClient) AddReaction(name string, item slack.ItemRef)

AddReaction provides a mock function with given fields: name, item

func (*SlackClient) GetReactions

func (_m *SlackClient) GetReactions(item slack.ItemRef, params slack.GetReactionsParameters) ([]slack.ItemReaction, error)

GetReactions provides a mock function with given fields: item, params

func (*SlackClient) RemoveReaction

func (_m *SlackClient) RemoveReaction(name string, item slack.ItemRef)

RemoveReaction provides a mock function with given fields: name, item

func (*SlackClient) Reply

func (_m *SlackClient) Reply(event slack.MessageEvent, text string)

Reply provides a mock function with given fields: event, text

func (*SlackClient) ReplyError

func (_m *SlackClient) ReplyError(event slack.MessageEvent, err error)

ReplyError provides a mock function with given fields: event, err

func (*SlackClient) SendMessage

func (_m *SlackClient) SendMessage(event slack.MessageEvent, text string, options ...slack.MsgOption) string

SendMessage provides a mock function with given fields: event, text, options

func (*SlackClient) SendToUser

func (_m *SlackClient) SendToUser(user string, text string) string

SendToUser provides a mock function with given fields: user, text

type Stash

type Stash struct {
	mock.Mock
}

Stash is an autogenerated mock type for the Stash type

func (*Stash) ApprovePullRequest

func (_m *Stash) ApprovePullRequest(projectKey string, repositorySlug string, pullRequestID int, pullRequestVersion int) error

ApprovePullRequest provides a mock function with given fields: projectKey, repositorySlug, pullRequestID, pullRequestVersion

func (*Stash) CreateBranchRestriction

func (_m *Stash) CreateBranchRestriction(projectKey string, repositorySlug string, branch string, user string) (stash.BranchRestriction, error)

CreateBranchRestriction provides a mock function with given fields: projectKey, repositorySlug, branch, user

func (*Stash) CreateComment

func (_m *Stash) CreateComment(projectKey string, repositorySlug string, pullRequest string, text string) (stash.Comment, error)

CreateComment provides a mock function with given fields: projectKey, repositorySlug, pullRequest, text

func (*Stash) CreatePullRequest

func (_m *Stash) CreatePullRequest(projectKey string, repositorySlug string, title string, description string, fromRef string, toRef string, reviewers []string) (stash.PullRequest, error)

CreatePullRequest provides a mock function with given fields: projectKey, repositorySlug, title, description, fromRef, toRef, reviewers

func (*Stash) CreateRepository

func (_m *Stash) CreateRepository(projectKey string, slug string) (stash.Repository, error)

CreateRepository provides a mock function with given fields: projectKey, slug

func (*Stash) DeclinePullRequest

func (_m *Stash) DeclinePullRequest(projectKey string, repositorySlug string, pullRequestID int, pullRequestVersion int) error

DeclinePullRequest provides a mock function with given fields: projectKey, repositorySlug, pullRequestID, pullRequestVersion

func (*Stash) DeleteBranch

func (_m *Stash) DeleteBranch(projectKey string, repositorySlug string, branchName string) error

DeleteBranch provides a mock function with given fields: projectKey, repositorySlug, branchName

func (*Stash) DeleteBranchRestriction

func (_m *Stash) DeleteBranchRestriction(projectKey string, repositorySlug string, id int) error

DeleteBranchRestriction provides a mock function with given fields: projectKey, repositorySlug, id

func (*Stash) GetBranchRestrictions

func (_m *Stash) GetBranchRestrictions(projectKey string, repositorySlug string) (stash.BranchRestrictions, error)

GetBranchRestrictions provides a mock function with given fields: projectKey, repositorySlug

func (*Stash) GetBranches

func (_m *Stash) GetBranches(projectKey string, repositorySlug string) (map[string]stash.Branch, error)

GetBranches provides a mock function with given fields: projectKey, repositorySlug

func (*Stash) GetCommit

func (_m *Stash) GetCommit(projectKey string, repositorySlug string, commitHash string) (stash.Commit, error)

GetCommit provides a mock function with given fields: projectKey, repositorySlug, commitHash

func (*Stash) GetCommits

func (_m *Stash) GetCommits(projectKey string, repositorySlug string, commitSinceHash string, commitUntilHash string) (stash.Commits, error)

GetCommits provides a mock function with given fields: projectKey, repositorySlug, commitSinceHash, commitUntilHash

func (*Stash) GetPullRequest

func (_m *Stash) GetPullRequest(projectKey string, repositorySlug string, identifier string) (stash.PullRequest, error)

GetPullRequest provides a mock function with given fields: projectKey, repositorySlug, identifier

func (*Stash) GetPullRequests

func (_m *Stash) GetPullRequests(projectKey string, repositorySlug string, state string) ([]stash.PullRequest, error)

GetPullRequests provides a mock function with given fields: projectKey, repositorySlug, state

func (*Stash) GetRawFile

func (_m *Stash) GetRawFile(projectKey string, repositorySlug string, branch string, filePath string) ([]byte, error)

GetRawFile provides a mock function with given fields: projectKey, repositorySlug, branch, filePath

func (*Stash) GetRepositories

func (_m *Stash) GetRepositories() (map[int]stash.Repository, error)

GetRepositories provides a mock function with given fields:

func (*Stash) GetRepository

func (_m *Stash) GetRepository(projectKey string, repositorySlug string) (stash.Repository, error)

GetRepository provides a mock function with given fields: projectKey, repositorySlug

func (*Stash) GetTags

func (_m *Stash) GetTags(projectKey string, repositorySlug string) (map[string]stash.Tag, error)

GetTags provides a mock function with given fields: projectKey, repositorySlug

func (*Stash) MergePullRequest

func (_m *Stash) MergePullRequest(projectKey string, repositorySlug string, pullRequestID int, pullRequestVersion int) error

MergePullRequest provides a mock function with given fields: projectKey, repositorySlug, pullRequestID, pullRequestVersion

func (*Stash) SetHTTPClient

func (_m *Stash) SetHTTPClient(httpClient *http.Client)

SetHTTPClient provides a mock function with given fields: httpClient

func (*Stash) UpdatePullRequest

func (_m *Stash) UpdatePullRequest(projectKey string, repositorySlug string, identifier string, version int, title string, description string, toRef string, reviewers []string) (stash.PullRequest, error)

UpdatePullRequest provides a mock function with given fields: projectKey, repositorySlug, identifier, version, title, description, toRef, reviewers

Jump to

Keyboard shortcuts

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