Documentation ¶
Index ¶
- func DisableLogging()
- func NewDefaultConfig() actuator.Configuration
- func NewDefaultOriginalPullRequestEvent(number int, action string) *gh.PullRequestEvent
- func NewDefaultTestEvent() *github.Event
- func NewTestEvent(number int, action string, repoName string) *github.Event
- type MockEventHandler
- type MockGithubClient
- type MockShell
- type OpenshiftMock
- func (om *OpenshiftMock) DeleteApp(labels *openshift.ObjectLabels) (*openshift.DeleteAppOutput, error)
- func (om *OpenshiftMock) GetURLForRoute(routeName string) (string, error)
- func (om *OpenshiftMock) NewAppFromTemplate(templateName string, templateParameters openshift.TemplateParameters, ...) (*openshift.NewAppOutput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfig ¶
func NewDefaultConfig() actuator.Configuration
func NewDefaultOriginalPullRequestEvent ¶
func NewDefaultOriginalPullRequestEvent(number int, action string) *gh.PullRequestEvent
func NewDefaultTestEvent ¶
Types ¶
type MockEventHandler ¶
type MockEventHandler struct { EventResponse actuator.EventResponse EventWasHandled bool LastEvent *github.Event Done chan bool }
func NewMockEventHandler ¶
func NewMockEventHandler(message string) *MockEventHandler
func (*MockEventHandler) GetEventResponse ¶
func (h *MockEventHandler) GetEventResponse(event *github.Event) *actuator.EventResponse
func (*MockEventHandler) HandleEvent ¶
func (h *MockEventHandler) HandleEvent(event *github.Event)
type MockGithubClient ¶
type MockGithubClient struct {
LastComment *github.IssueComment
}
func NewMockGithubClient ¶
func NewMockGithubClient() *MockGithubClient
func (*MockGithubClient) CreateComment ¶
func (tgc *MockGithubClient) CreateComment(owner string, repo string, issueNumber int, body string) (*github.IssueComment, error)
CreateComment returns a fake comment and saves it as LastComment
type OpenshiftMock ¶
type OpenshiftMock struct { AppliedTemplate string AppliedLabels openshift.ObjectLabels AppliedParameters openshift.TemplateParameters DeletedLabels openshift.ObjectLabels NewAppOutputToReturn openshift.NewAppOutput DeleteAppOutputToReturn openshift.DeleteAppOutput }
OpenshiftMock implements the OpenshiftClient interface to mock calls to the cli
func (*OpenshiftMock) DeleteApp ¶
func (om *OpenshiftMock) DeleteApp(labels *openshift.ObjectLabels) (*openshift.DeleteAppOutput, error)
DeleteApp mocks the delte operation
func (*OpenshiftMock) GetURLForRoute ¶
func (om *OpenshiftMock) GetURLForRoute(routeName string) (string, error)
GetURLForRoute turns the route into an url
func (*OpenshiftMock) NewAppFromTemplate ¶
func (om *OpenshiftMock) NewAppFromTemplate(templateName string, templateParameters openshift.TemplateParameters, labels openshift.ObjectLabels) (*openshift.NewAppOutput, error)
NewAppFromTemplate mocks the apply template method and records the passed values
Click to show internal directories.
Click to hide internal directories.