Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RenderTestSummaryInput ¶
type RenderTestSummaryInput struct { TestResultWindowTime time.Duration TotalTestsCnt int FailedTests []internal.TestStatus TestRunnerInfo TestRunnerInfo }
RenderTestSummaryInput holds input parameters required to render test summary
type SlackClient ¶
type SlackClient struct {
// contains filtered or unexported fields
}
SlackClient sends message to slack channel
func NewSlackClient ¶
func NewSlackClient(cfg SlackClientConfig) *SlackClient
NewSlackClient returns new instance of SlackClient
func (*SlackClient) Send ¶
func (c *SlackClient) Send(header, body, footer, color string) error
Send sends message with given content to slack channel
type SlackClientConfig ¶
SlackClientConfig holds configuration for slack client
type SlackNotifier ¶
type SlackNotifier struct {
// contains filtered or unexported fields
}
SlackNotifier sends notification about test result to Slack channel.
func New ¶
func New( slack slackClient, testRenderer testRenderer, cfgMapClient configMapClient, cfgMapName string, resultWindowTime time.Duration, testRunnerPodName, testRunnerNamespace string, log logrus.FieldLogger) *SlackNotifier
New returns new instance of SlackNotifier
func (*SlackNotifier) Run ¶
func (s *SlackNotifier) Run(ctx context.Context)
Run sends in a loop notification about test result to Slack channel
type TestRenderer ¶
type TestRenderer struct {
// contains filtered or unexported fields
}
TestRenderer renders test summary
func NewTestRenderer ¶
func NewTestRenderer() (*TestRenderer, error)
NewTestRenderer returns new instance of TestRenderer
func (*TestRenderer) RenderTestSummary ¶
func (s *TestRenderer) RenderTestSummary(in RenderTestSummaryInput) (string, string, string, error)
RenderTestSummary returns header and body summary of given tests
type TestRunnerInfo ¶
TestRunnerInfo describes test runner in kubernetes system