Documentation
¶
Overview ¶
Package fake provides an in-process tracker.Tracker for tests. It registers itself under type "fake" so close_e2e_test.go can wire it through config.IssueTrackerConfig like a real adapter.
Index ¶
- func New(_ config.IssueTrackerConfig) (tracker.Tracker, error)
- type Tracker
- func (t *Tracker) IsIssueClosed(_ context.Context, issueID string) (bool, error)
- func (t *Tracker) ListIssues(_ context.Context) ([]tracker.Issue, error)
- func (t *Tracker) ListStatuses(_ context.Context) ([]string, error)
- func (t *Tracker) UpdateIssueStatus(_ context.Context, issueID, statusName string) error
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tracker ¶
type Tracker struct {
Issues []tracker.Issue
Statuses []string
RecordedUpdates []Update
// Closed[id] == true → IsIssueClosed returns (true, nil) for id.
// Default zero-value (absent or false) → IsIssueClosed returns (false, nil).
Closed map[string]bool
// Unknown[id] == true → IsIssueClosed returns (false, tracker.ErrIssueNotFound).
Unknown map[string]bool
// Errors[id] != nil → IsIssueClosed returns (false, Errors[id]) — for transport-error scenarios.
Errors map[string]error
// contains filtered or unexported fields
}
Tracker is the exposed concrete type so tests can read RecordedUpdates after Close() returns. Construct via New() to satisfy the registry signature.
func (*Tracker) IsIssueClosed ¶ added in v0.10.0
IsIssueClosed consults Closed / Unknown / Errors in that priority order.
func (*Tracker) ListIssues ¶
ListIssues returns a snapshot of the configured issues.
func (*Tracker) ListStatuses ¶
ListStatuses returns a snapshot of the configured status names.
Click to show internal directories.
Click to hide internal directories.