Documentation
¶
Overview ¶
Package jiramock provides a stateful mock Jira REST API server for behaviour tests. The mock implements the endpoints that jira.LiveClient calls, backed by in-memory state that step definitions manipulate between requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
State holds the mutable mock data. All methods are safe for concurrent use.
func NewServer ¶
NewServer creates a mock Jira REST API server and returns the httptest server and its backing state. The caller should defer srv.Close().
func (*State) AddComment ¶
AddComment appends a comment to the given issue. The comment is authored by a canned human user (not a bot).
func (*State) AddIssue ¶
AddIssue inserts an issue with the given key and labels. A synthetic numeric ID and timestamp are assigned automatically.
func (*State) AddLabelChange ¶
AddLabelChange appends a changelog entry representing a label addition and updates the issue's label list.