Documentation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResource ¶
func CreateResource(t *testing.T, obj CreateObjects)
CreateResource with fake client
Types ¶
type CreateObjects ¶
type CreateObjects struct { GVR schema.GroupVersionResource Kind string Namespace string Specs runtime.Object NotifType config.NotifType ExpectedWebhookPayload WebhookPayload ExpectedSlackMessage SlackMessage }
CreateObjects stores specs for creating a k8s fake object and expected Slack response
type SlackMessage ¶
type SlackMessage struct { Text string Attachments []slack.Attachment }
SlackMessage structure
type WebhookPayload ¶
type WebhookPayload struct { Summary string `json:"summary"` EventMeta notify.EventMeta `json:"meta"` EventStatus notify.EventStatus `json:"status"` }
WebhookPayload structure