fakejira

package
v0.0.0-...-4359601 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FakeJiraUrl = "https://my-jira.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	Issues           []*jira.Issue
	ExistingLinks    map[string][]jira.RemoteLink
	NewLinks         []jira.RemoteLink
	RemovedLinks     []jira.RemoteLink
	IssueLinks       []*jira.IssueLink
	GetIssueError    map[string]error
	CreateIssueError map[string]error
	UpdateIssueError map[string]error
	Transitions      []jira.Transition
	Users            []*jira.User
	SearchResponses  map[SearchRequest]SearchResponse
	ProjectVersions  map[string][]*jira.Version
}

func (*FakeClient) AddComment

func (f *FakeClient) AddComment(issueID string, comment *jira.Comment) (*jira.Comment, error)
func (f *FakeClient) AddRemoteLink(id string, link *jira.RemoteLink) (*jira.RemoteLink, error)

func (*FakeClient) CloneIssue

func (f *FakeClient) CloneIssue(issue *jira.Issue) (*jira.Issue, error)

func (*FakeClient) CreateIssue

func (f *FakeClient) CreateIssue(issue *jira.Issue) (*jira.Issue, error)
func (f *FakeClient) CreateIssueLink(link *jira.IssueLink) error
func (f *FakeClient) DeleteLink(id string) error
func (f *FakeClient) DeleteRemoteLink(issueID string, linkID int) error

TODO: improve handling of remote links in fake client; having a separate NewLinks struct that contains links not in existingLinks may limit some aspects of testing

func (*FakeClient) DeleteRemoteLinkViaURL

func (f *FakeClient) DeleteRemoteLinkViaURL(issueID, url string) (bool, error)

func (*FakeClient) DoTransition

func (f *FakeClient) DoTransition(issueID, transitionID string) error

func (*FakeClient) FindUser

func (f *FakeClient) FindUser(property string) ([]*jira.User, error)

func (*FakeClient) ForPlugin

func (f *FakeClient) ForPlugin(string) jiraclient.Client

func (*FakeClient) GetIssue

func (f *FakeClient) GetIssue(id string) (*jira.Issue, error)

func (*FakeClient) GetIssueQaContact

func (f *FakeClient) GetIssueQaContact(issue *jira.Issue) (*jira.User, error)

func (*FakeClient) GetIssueSecurityLevel

func (f *FakeClient) GetIssueSecurityLevel(issue *jira.Issue) (*jiraclient.SecurityLevel, error)

func (*FakeClient) GetIssueTargetVersion

func (f *FakeClient) GetIssueTargetVersion(issue *jira.Issue) (*[]*jira.Version, error)

func (*FakeClient) GetProjectVersions

func (f *FakeClient) GetProjectVersions(project string) ([]*jira.Version, error)
func (f *FakeClient) GetRemoteLinks(id string) ([]jira.RemoteLink, error)

func (*FakeClient) GetTransitions

func (f *FakeClient) GetTransitions(issueID string) ([]jira.Transition, error)

func (*FakeClient) JiraClient

func (f *FakeClient) JiraClient() *jira.Client

func (*FakeClient) JiraURL

func (f *FakeClient) JiraURL() string

func (*FakeClient) ListProjects

func (f *FakeClient) ListProjects() (*jira.ProjectList, error)

func (*FakeClient) SearchWithContext

func (f *FakeClient) SearchWithContext(ctx context.Context, jql string, options *jira.SearchOptions) ([]jira.Issue, *jira.Response, error)

func (*FakeClient) UpdateIssue

func (f *FakeClient) UpdateIssue(issue *jira.Issue) (*jira.Issue, error)
func (f *FakeClient) UpdateRemoteLink(id string, link *jira.RemoteLink) error

func (*FakeClient) UpdateStatus

func (f *FakeClient) UpdateStatus(issueID, statusName string) error

func (*FakeClient) Used

func (f *FakeClient) Used() bool

func (*FakeClient) WithFields

func (f *FakeClient) WithFields(fields logrus.Fields) jiraclient.Client

type SearchRequest

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

type SearchResponse

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

Jump to

Keyboard shortcuts

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