From b4852da221eda4d3d02b557b8259dbfca5502e78 Mon Sep 17 00:00:00 2001 From: Gabriel Freites Date: Thu, 27 Jul 2023 22:11:54 +0200 Subject: [PATCH] added defered confirmation to connection mock --- pkg/rabbit/rabbit_mocks.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rabbit/rabbit_mocks.go b/pkg/rabbit/rabbit_mocks.go index 9c2cde6edb..333d059567 100644 --- a/pkg/rabbit/rabbit_mocks.go +++ b/pkg/rabbit/rabbit_mocks.go @@ -61,6 +61,7 @@ func (rm *RabbitMQBadConnectionMock) NotifyClose(c chan *amqp.Error) chan *amqp. type RabbitMQChannelMock struct { NotifyCloseChannel chan *amqp.Error ConsumeChannel <-chan amqp.Delivery + dc *amqp.DeferredConfirmation } func (rm *RabbitMQChannelMock) IsClosed() bool { @@ -83,7 +84,7 @@ func (rm *RabbitMQChannelMock) Consume(a string, b string, c bool, d bool, e boo } func (rm *RabbitMQChannelMock) PublishWithDeferredConfirm(a string, b string, c bool, d bool, p amqp.Publishing) (*amqp.DeferredConfirmation, error) { - return &amqp.DeferredConfirmation{}, nil + return rm.dc, nil } func (rm *RabbitMQChannelMock) Confirm(a bool) error {