Skip to content

Commit 6d8aaeb

Browse files
authored
Merge pull request #12 from rabbitmq/rabbitmq-amqp-go-client-3
API consistency with .NET client
2 parents 189408c + b9a14aa commit 6d8aaeb

17 files changed

+182
-190
lines changed

examples/getting_started/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func main() {
4848
}
4949
fmt.Printf("Exchange %s created.\n", exchangeInfo.GetName())
5050

51-
bindingSpec := management.Binding().SourceExchange(exchangeInfo.GetName()).DestinationQueue(queueInfo.GetName()).Key("routing-key")
51+
bindingSpec := management.Binding().SourceExchange(exchangeSpec).DestinationQueue(queueSpec).Key("routing-key")
5252

5353
err = bindingSpec.Bind(context.Background())
5454
if err != nil {

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ module github.com/rabbitmq/rabbitmq-amqp-go-client
33
go 1.22.0
44

55
require (
6+
github.com/Azure/go-amqp v1.1.1-0.20240913224415-f631e6909719
7+
github.com/google/uuid v1.6.0
68
github.com/onsi/ginkgo/v2 v2.20.2
79
github.com/onsi/gomega v1.34.2
810
)
911

1012
require (
11-
github.com/Azure/go-amqp v1.1.1-0.20240913224415-f631e6909719 // indirect
1213
github.com/go-logr/logr v1.4.2 // indirect
1314
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
1415
github.com/google/go-cmp v0.6.0 // indirect
15-
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
16-
github.com/google/uuid v1.6.0 // indirect
17-
golang.org/x/net v0.28.0 // indirect
18-
golang.org/x/sys v0.24.0 // indirect
19-
golang.org/x/text v0.17.0 // indirect
20-
golang.org/x/tools v0.24.0 // indirect
16+
github.com/google/pprof v0.0.0-20240910150728-a0b0bb1d4134 // indirect
17+
golang.org/x/net v0.29.0 // indirect
18+
golang.org/x/sys v0.25.0 // indirect
19+
golang.org/x/text v0.18.0 // indirect
20+
golang.org/x/tools v0.25.0 // indirect
2121
gopkg.in/yaml.v3 v3.0.1 // indirect
2222
)

go.sum

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
github.com/Azure/go-amqp v1.1.1-0.20240913224415-f631e6909719 h1:rL7yrEV9yputQV7T+Y9eJVmTVkK4B0aHlBc8TUITC5A=
22
github.com/Azure/go-amqp v1.1.1-0.20240913224415-f631e6909719/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE=
3-
github.com/Gsantomaggio/go-amqp v0.0.0-20240905094626-af192b497e48 h1:etxEtd7qkhJD34gpQesPbZuMJrqkc+ZOXqR3diVfGWs=
4-
github.com/Gsantomaggio/go-amqp v0.0.0-20240905094626-af192b497e48/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE=
53
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
64
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
75
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
@@ -12,8 +10,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v
1210
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
1311
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
1412
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
15-
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA=
16-
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
13+
github.com/google/pprof v0.0.0-20240910150728-a0b0bb1d4134 h1:c5FlPPgxOn7kJz3VoPLkQYQXGBS3EklQ4Zfi57uOuqQ=
14+
github.com/google/pprof v0.0.0-20240910150728-a0b0bb1d4134/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
1715
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1816
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1917
github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4=
@@ -24,14 +22,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
2422
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2523
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
2624
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
27-
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
28-
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
29-
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
30-
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
31-
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
32-
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
33-
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
34-
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
25+
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
26+
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
27+
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
28+
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
29+
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
30+
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
31+
golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE=
32+
golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg=
3533
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
3634
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
3735
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

rabbitmq_amqp/amqp_binding.go

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ type AMQPBindingInfo struct {
99
}
1010

1111
type AMQPBinding struct {
12-
sourceExchangeName string
13-
destinationQueue string
14-
bindingKey string
15-
management *AmqpManagement
12+
sourceName string
13+
destinationName string
14+
toQueue bool
15+
bindingKey string
16+
management *AmqpManagement
1617
}
1718

1819
func newAMQPBinding(management *AmqpManagement) *AMQPBinding {
@@ -24,31 +25,55 @@ func (b *AMQPBinding) Key(bindingKey string) IBindingSpecification {
2425
return b
2526
}
2627

27-
func (b *AMQPBinding) SourceExchange(exchangeName string) IBindingSpecification {
28-
b.sourceExchangeName = exchangeName
28+
func (b *AMQPBinding) SourceExchange(exchangeSpec IExchangeSpecification) IBindingSpecification {
29+
b.sourceName = exchangeSpec.GetName()
30+
b.toQueue = false
2931
return b
3032
}
3133

32-
func (b *AMQPBinding) DestinationQueue(queueName string) IBindingSpecification {
33-
b.destinationQueue = queueName
34+
func (b *AMQPBinding) SourceExchangeName(exchangeName string) IBindingSpecification {
35+
b.sourceName = exchangeName
36+
b.toQueue = false
3437
return b
3538
}
3639

37-
func (b *AMQPBinding) Bind(ctx context.Context) error {
40+
func (b *AMQPBinding) DestinationExchange(exchangeSpec IExchangeInfo) IBindingSpecification {
41+
b.destinationName = exchangeSpec.GetName()
42+
b.toQueue = false
43+
return b
44+
}
45+
46+
func (b *AMQPBinding) DestinationExchangeName(exchangeName string) IBindingSpecification {
47+
b.destinationName = exchangeName
48+
b.toQueue = false
49+
return b
50+
}
51+
52+
func (b *AMQPBinding) DestinationQueue(queueSpec IQueueSpecification) IBindingSpecification {
53+
b.destinationName = queueSpec.GetName()
54+
b.toQueue = true
55+
return b
56+
}
3857

58+
func (b *AMQPBinding) DestinationQueueName(queueName string) IBindingSpecification {
59+
b.destinationName = queueName
60+
b.toQueue = true
61+
return b
62+
}
63+
64+
func (b *AMQPBinding) Bind(ctx context.Context) error {
3965
path := bindingPath()
4066
kv := make(map[string]any)
4167
kv["binding_key"] = b.bindingKey
42-
kv["source"] = b.sourceExchangeName
43-
kv["destination_queue"] = b.destinationQueue
68+
kv["source"] = b.sourceName
69+
kv["destination_queue"] = b.destinationName
4470
kv["arguments"] = make(map[string]any)
4571
_, err := b.management.Request(ctx, kv, path, commandPost, []int{responseCode204})
4672
return err
47-
4873
}
4974

5075
func (b *AMQPBinding) Unbind(ctx context.Context) error {
51-
bindingPathWithExchangeQueueKey := bindingPathWithExchangeQueueKey(b.sourceExchangeName, b.destinationQueue, b.bindingKey)
76+
bindingPathWithExchangeQueueKey := bindingPathWithExchangeQueueKey(b.toQueue, b.sourceName, b.destinationName, b.bindingKey)
5277
_, err := b.management.Request(ctx, amqp.Null{}, bindingPathWithExchangeQueueKey, commandDelete, []int{responseCode204})
5378
return err
5479
}

rabbitmq_amqp/amqp_binding_test.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
)
88

99
var _ = Describe("AMQP Bindings test ", func() {
10-
1110
var connection IConnection
1211
var management IManagement
1312
BeforeEach(func() {
@@ -26,9 +25,9 @@ var _ = Describe("AMQP Bindings test ", func() {
2625
Expect(connection.Close(context.Background())).To(BeNil())
2726
})
2827

29-
It("AMQP Bindings between Exchange and Queue Should success ", func() {
30-
const exchangeName = "Exchange_AMQP Bindings between Exchange and Queue Should success"
31-
const queueName = "Queue_AMQP Bindings between Exchange and Queue Should success"
28+
It("AMQP Bindings between Exchange and Queue Should succeed", func() {
29+
const exchangeName = "Exchange_AMQP Bindings between Exchange and Queue should uccess"
30+
const queueName = "Queue_AMQP Bindings between Exchange and Queue should succeed"
3231
exchangeSpec := management.Exchange(exchangeName)
3332
exchangeInfo, err := exchangeSpec.Declare(context.TODO())
3433
Expect(err).To(BeNil())
@@ -41,9 +40,7 @@ var _ = Describe("AMQP Bindings test ", func() {
4140
Expect(queueInfo).NotTo(BeNil())
4241
Expect(queueInfo.GetName()).To(Equal(queueName))
4342

44-
bindingSpec := management.Binding().SourceExchange(exchangeName).
45-
DestinationQueue(queueName).
46-
Key("routing-key")
43+
bindingSpec := management.Binding().SourceExchange(exchangeSpec).DestinationQueue(queueSpec).Key("routing-key")
4744
err = bindingSpec.Bind(context.TODO())
4845
Expect(err).To(BeNil())
4946
err = bindingSpec.Unbind(context.TODO())
@@ -52,7 +49,5 @@ var _ = Describe("AMQP Bindings test ", func() {
5249
Expect(err).To(BeNil())
5350
err = queueSpec.Delete(context.TODO())
5451
Expect(err).To(BeNil())
55-
5652
})
57-
5853
})

rabbitmq_amqp/amqp_connection.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func (c *ConnectionSettings) Port(port int) IConnectionSettings {
4444
}
4545

4646
func (c *ConnectionSettings) User(userName string) IConnectionSettings {
47-
4847
c.user = userName
4948
return c
5049
}
@@ -71,7 +70,6 @@ func (c *ConnectionSettings) GetHost() string {
7170
func (c *ConnectionSettings) Host(hostName string) IConnectionSettings {
7271
c.host = hostName
7372
return c
74-
7573
}
7674

7775
func (c *ConnectionSettings) GetPort() int {
@@ -170,6 +168,7 @@ func (a *AmqpConnection) Open(ctx context.Context, connectionSettings IConnectio
170168

171169
err = a.Management().Open(ctx, a)
172170
if err != nil {
171+
// TODO close connection?
173172
return err
174173
}
175174
return nil

rabbitmq_amqp/amqp_connection_test.go

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
var _ = Describe("AMQP Connection Test", func() {
11-
It("AMQP SASLTypeAnonymous Connection should success", func() {
11+
It("AMQP SASLTypeAnonymous Connection should succeed", func() {
1212
amqpConnection := NewAmqpConnection()
1313
Expect(amqpConnection).NotTo(BeNil())
1414
Expect(amqpConnection).To(BeAssignableToTypeOf(&AmqpConnection{}))
@@ -17,11 +17,14 @@ var _ = Describe("AMQP Connection Test", func() {
1717
Expect(connectionSettings).NotTo(BeNil())
1818
connectionSettings.SaslMechanism(SaslMechanism{Type: Anonymous})
1919
Expect(connectionSettings).To(BeAssignableToTypeOf(&ConnectionSettings{}))
20-
err := amqpConnection.Open(context.TODO(), connectionSettings)
20+
21+
err := amqpConnection.Open(context.Background(), connectionSettings)
22+
Expect(err).To(BeNil())
23+
err = amqpConnection.Close(context.Background())
2124
Expect(err).To(BeNil())
2225
})
2326

24-
It("AMQP SASLTypePlain Connection should success", func() {
27+
It("AMQP SASLTypePlain Connection should succeed", func() {
2528
amqpConnection := NewAmqpConnection()
2629
Expect(amqpConnection).NotTo(BeNil())
2730
Expect(amqpConnection).To(BeAssignableToTypeOf(&AmqpConnection{}))
@@ -30,7 +33,10 @@ var _ = Describe("AMQP Connection Test", func() {
3033
Expect(connectionSettings).NotTo(BeNil())
3134
Expect(connectionSettings).To(BeAssignableToTypeOf(&ConnectionSettings{}))
3235
connectionSettings.SaslMechanism(SaslMechanism{Type: Plain})
33-
err := amqpConnection.Open(context.TODO(), connectionSettings)
36+
37+
err := amqpConnection.Open(context.Background(), connectionSettings)
38+
Expect(err).To(BeNil())
39+
err = amqpConnection.Close(context.Background())
3440
Expect(err).To(BeNil())
3541
})
3642

@@ -42,12 +48,12 @@ var _ = Describe("AMQP Connection Test", func() {
4248
Expect(connectionSettings).NotTo(BeNil())
4349
Expect(connectionSettings).To(BeAssignableToTypeOf(&ConnectionSettings{}))
4450
connectionSettings.Host("localhost").Port(1234)
45-
err := amqpConnection.Open(context.TODO(), connectionSettings)
51+
52+
err := amqpConnection.Open(context.Background(), connectionSettings)
4653
Expect(err).NotTo(BeNil())
4754
})
4855

4956
It("AMQP Connection should fail due of wrong host", func() {
50-
5157
amqpConnection := NewAmqpConnection()
5258
Expect(amqpConnection).NotTo(BeNil())
5359
Expect(amqpConnection).To(BeAssignableToTypeOf(&AmqpConnection{}))
@@ -56,11 +62,12 @@ var _ = Describe("AMQP Connection Test", func() {
5662
Expect(connectionSettings).NotTo(BeNil())
5763
Expect(connectionSettings).To(BeAssignableToTypeOf(&ConnectionSettings{}))
5864
connectionSettings.Host("wronghost").Port(5672)
59-
err := amqpConnection.Open(context.TODO(), connectionSettings)
65+
66+
err := amqpConnection.Open(context.Background(), connectionSettings)
6067
Expect(err).NotTo(BeNil())
6168
})
6269

63-
It("AMQP Connection should fail due of context cancelled", func() {
70+
It("AMQP Connection should fail due to context cancellation", func() {
6471
amqpConnection := NewAmqpConnection()
6572
Expect(amqpConnection).NotTo(BeNil())
6673
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
@@ -69,12 +76,12 @@ var _ = Describe("AMQP Connection Test", func() {
6976
Expect(err).NotTo(BeNil())
7077
})
7178

72-
It("AMQP Connection should receive events ", func() {
79+
It("AMQP Connection should receive events", func() {
7380
amqpConnection := NewAmqpConnection()
7481
Expect(amqpConnection).NotTo(BeNil())
7582
ch := make(chan *StatusChanged, 1)
7683
amqpConnection.NotifyStatusChange(ch)
77-
err := amqpConnection.Open(context.TODO(), NewConnectionSettings())
84+
err := amqpConnection.Open(context.Background(), NewConnectionSettings())
7885
Expect(err).To(BeNil())
7986
recv := <-ch
8087
Expect(recv).NotTo(BeNil())
@@ -88,7 +95,6 @@ var _ = Describe("AMQP Connection Test", func() {
8895

8996
Expect(recv.From).To(Equal(Open))
9097
Expect(recv.To).To(Equal(Closed))
91-
9298
})
9399

94100
//It("AMQP TLS Connection should success with SASLTypeAnonymous ", func() {
@@ -103,8 +109,7 @@ var _ = Describe("AMQP Connection Test", func() {
103109
// })
104110
// Expect(connectionSettings).NotTo(BeNil())
105111
// Expect(connectionSettings).To(BeAssignableToTypeOf(&ConnectionSettings{}))
106-
// err := amqpConnection.Open(context.TODO(), connectionSettings)
112+
// err := amqpConnection.Open(context.Background(), connectionSettings)
107113
// Expect(err).To(BeNil())
108114
//})
109-
110115
})

rabbitmq_amqp/amqp_exchange.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func newAmqpExchange(management *AmqpManagement, name string) *AmqpExchange {
3434
}
3535

3636
func (e *AmqpExchange) Declare(ctx context.Context) (IExchangeInfo, error) {
37-
3837
path := exchangePath(e.name)
3938
kv := make(map[string]any)
4039
kv["auto_delete"] = e.isAutoDelete

rabbitmq_amqp/amqp_exchange_test.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
)
88

99
var _ = Describe("AMQP Exchange test ", func() {
10-
1110
var connection IConnection
1211
var management IManagement
1312
BeforeEach(func() {
@@ -26,8 +25,8 @@ var _ = Describe("AMQP Exchange test ", func() {
2625
Expect(connection.Close(context.Background())).To(BeNil())
2726
})
2827

29-
It("AMQP Exchange Declare with Default and Delete should success ", func() {
30-
const exchangeName = "AMQP Exchange Declare and Delete with Default should success"
28+
It("AMQP Exchange Declare with Default and Delete should succeed", func() {
29+
const exchangeName = "AMQP Exchange Declare and Delete with Default should succeed"
3130
exchangeSpec := management.Exchange(exchangeName)
3231
exchangeInfo, err := exchangeSpec.Declare(context.TODO())
3332
Expect(err).To(BeNil())
@@ -37,8 +36,8 @@ var _ = Describe("AMQP Exchange test ", func() {
3736
Expect(err).To(BeNil())
3837
})
3938

40-
It("AMQP Exchange Declare with Topic and Delete should success ", func() {
41-
const exchangeName = "AMQP Exchange Declare with Topic and Delete should success"
39+
It("AMQP Exchange Declare with Topic and Delete should succeed", func() {
40+
const exchangeName = "AMQP Exchange Declare with Topic and Delete should succeed"
4241
exchangeSpec := management.Exchange(exchangeName).ExchangeType(ExchangeType{Topic})
4342
exchangeInfo, err := exchangeSpec.Declare(context.TODO())
4443
Expect(err).To(BeNil())
@@ -48,8 +47,8 @@ var _ = Describe("AMQP Exchange test ", func() {
4847
Expect(err).To(BeNil())
4948
})
5049

51-
It("AMQP Exchange Declare with FanOut and Delete should success ", func() {
52-
const exchangeName = "AMQP Exchange Declare with FanOut and Delete should success"
50+
It("AMQP Exchange Declare with FanOut and Delete should succeed", func() {
51+
const exchangeName = "AMQP Exchange Declare with FanOut and Delete should succeed"
5352
exchangeSpec := management.Exchange(exchangeName).ExchangeType(ExchangeType{FanOut})
5453
exchangeInfo, err := exchangeSpec.Declare(context.TODO())
5554
Expect(err).To(BeNil())
@@ -58,5 +57,4 @@ var _ = Describe("AMQP Exchange test ", func() {
5857
err = exchangeSpec.Delete(context.TODO())
5958
Expect(err).To(BeNil())
6059
})
61-
6260
})

0 commit comments

Comments
 (0)