Skip to content

Commit a2d1abf

Browse files
update azure to 1.5.1 (#75)
* update azure to 1.5.1 Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com> * Failing test (#76) Co-authored-by: Michal Kuratczyk <michal.kuratczyk@broadcom.com> --------- Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com> Co-authored-by: Michal Kuratczyk <michal.kuratczyk@broadcom.com>
1 parent 62f788e commit a2d1abf

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23.0
55
toolchain go1.24.5
66

77
require (
8-
github.com/Azure/go-amqp v1.5.0
8+
github.com/Azure/go-amqp v1.5.1
99
github.com/golang-jwt/jwt/v5 v5.2.2
1010
github.com/google/uuid v1.6.0
1111
github.com/onsi/ginkgo/v2 v2.23.4

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ github.com/Azure/go-amqp v1.4.0 h1:Xj3caqi4comOF/L1Uc5iuBxR/pB6KumejC01YQOqOR4=
22
github.com/Azure/go-amqp v1.4.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE=
33
github.com/Azure/go-amqp v1.5.0 h1:GRiQK1VhrNFbyx5VlmI6BsA1FCp27W5rb9kxOZScnTo=
44
github.com/Azure/go-amqp v1.5.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE=
5+
github.com/Azure/go-amqp v1.5.1 h1:WyiPTz2C3zVvDL7RLAqwWdeoYhMtX62MZzQoP09fzsU=
6+
github.com/Azure/go-amqp v1.5.1/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE=
57
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
68
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
79
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=

pkg/rabbitmqamqp/amqp_publisher_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package rabbitmqamqp
22

33
import (
44
"context"
5+
56
"github.com/Azure/go-amqp"
67
. "github.com/onsi/ginkgo/v2"
78
. "github.com/onsi/gomega"
@@ -46,6 +47,22 @@ var _ = Describe("AMQP publisher ", func() {
4647
Expect(connection.Close(context.Background())).To(BeNil())
4748
})
4849

50+
It("NewPublisher should fail for a non-existing queue", func() {
51+
connection, err := Dial(context.Background(), "amqp://", nil)
52+
Expect(err).To(BeNil())
53+
Expect(connection).NotTo(BeNil())
54+
queueName := generateNameWithDateTime("NonExistingQueue")
55+
56+
// Try to create a publisher to a queue that doesn't exist
57+
// This MUST fail at the NewPublisher step
58+
publisher, err := connection.NewPublisher(context.Background(), &QueueAddress{Queue: queueName}, nil)
59+
Expect(err).NotTo(BeNil())
60+
Expect(err.Error()).To(ContainSubstring("amqp:not-found"))
61+
Expect(err.Error()).To(ContainSubstring("no queue"))
62+
Expect(publisher).To(BeNil())
63+
Expect(connection.Close(context.Background())).To(BeNil())
64+
})
65+
4966
It("publishResult should released to a not existing routing key", func() {
5067
eName := generateNameWithDateTime("publishResult should released to a not existing routing key")
5168
connection, err := Dial(context.Background(), "amqp://", nil)

0 commit comments

Comments
 (0)