Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertTimestampIsUnixSeconds ¶ added in v0.5.1
AssertTimestampIsUnixSeconds verifies that a timestamp string is in Unix seconds format (not milliseconds). It checks if the timestamp is within a reasonable range for Unix seconds (between year 2000 and 2100).
Types ¶
type Config ¶
type Config struct {
Provider destregistry.Provider
Dest *models.Destination
Consumer MessageConsumer
// Optional asserter for provider-specific message checks
Asserter MessageAsserter
}
Config is used to initialize the test suite
type Message ¶
type Message struct {
Data []byte
Metadata map[string]string
// Raw contains the provider-specific message type (e.g. amqp.Delivery, http.Request)
Raw interface{}
}
Message represents a message that was received by the consumer
type MessageAsserter ¶
type MessageAsserter interface {
// AssertMessage is called after the base assertions to allow provider-specific checks
AssertMessage(t TestingT, msg Message, event models.Event)
}
MessageAsserter allows providers to add their own assertions on the raw message
type MessageConsumer ¶
type MessageConsumer interface {
// Consume returns a channel that receives messages
Consume() <-chan Message
// Close stops consuming messages
Close() error
}
MessageConsumer is the interface that providers must implement
type PublisherSuite ¶
PublisherSuite is the base test suite that providers should embed
func (*PublisherSuite) InitSuite ¶
func (s *PublisherSuite) InitSuite(cfg Config)
func (*PublisherSuite) SetupTest ¶
func (s *PublisherSuite) SetupTest()
func (*PublisherSuite) TearDownTest ¶
func (s *PublisherSuite) TearDownTest()
func (*PublisherSuite) TestBasicPublish ¶
func (s *PublisherSuite) TestBasicPublish()
func (*PublisherSuite) TestClosePublisherDuringConcurrentPublish ¶
func (s *PublisherSuite) TestClosePublisherDuringConcurrentPublish()
func (*PublisherSuite) TestConcurrentPublish ¶
func (s *PublisherSuite) TestConcurrentPublish()
Click to show internal directories.
Click to hide internal directories.