fixed linting issues
This commit is contained in:
@@ -235,12 +235,6 @@ func (m *mockChannel) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type mockConnection struct{}
|
||||
|
||||
func (m *mockConnection) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestNewPublisherSucess(t *testing.T) {
|
||||
originalDialFunc := DialFunc
|
||||
originalChannelFunc := ChannelFunc
|
||||
@@ -284,18 +278,6 @@ func TestNewPublisherSucess(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
type mockChannelFailDeclare struct{}
|
||||
|
||||
func (m *mockChannelFailDeclare) PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp091.Publishing) error {
|
||||
return nil
|
||||
}
|
||||
func (m *mockChannelFailDeclare) ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait bool, args amqp091.Table) error {
|
||||
return fmt.Errorf("simulated exchange declare error")
|
||||
}
|
||||
func (m *mockChannelFailDeclare) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestNewPublisherFailures(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user