slack

package
v0.0.0-...-7ec6de2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package slack contains routines useful for testing slack integrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateExpectedSlackMessageE

func ValidateExpectedSlackMessageE(
	t testing.TestingT,
	token,
	channelID,
	expectedText string,
	historyLimit int,
	lookBack time.Duration,
) error

ValidateExpectedSlackMessage validates whether a message containing the expected text was posted in the given channel ID, looking back historyLimit messages up to the given duration. For example, if you set (15*time.Minute) as the lookBack parameter with historyLimit set to 50, then this will look back the last 50 messages, up to 15 minutes ago. This expects a slack token to be provided. This returns MessageNotFoundErr when there is no match. For the purposes of matching, this only checks the following blocks: - Section block text - Header block text All other blocks are ignored in the validation. NOTE: This only looks for bot posted messages.

Types

type MessageNotFoundErr

type MessageNotFoundErr struct{}

func (MessageNotFoundErr) Error

func (err MessageNotFoundErr) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL