Skip to content

Commit

Permalink
Accidentally removed original /queues test, returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbcooper committed Aug 2, 2018
1 parent cd26136 commit 9c08214
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions rabbithole_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,43 @@ var _ = Describe("Rabbithole", func() {
Ω(q.Status).ShouldNot(BeNil())
})
})
Context("GET /queues with arguments", func() {
It("returns decoded response", func() {
conn := openConnection("/")
defer conn.Close()

ch, err := conn.Channel()
Ω(err).Should(BeNil())
defer ch.Close()

_, err = ch.QueueDeclare(
"", // name
false, // durable
false, // auto delete
true, // exclusive
false,
nil)
Ω(err).Should(BeNil())

// give internal events a moment to be
// handled
awaitEventPropagation()

params := url.Values{}
params.Add("lengths_age", "1800")
params.Add("lengths_incr", "30")

qs, err := rmqc.ListQueuesWithParameters(params)
Ω(err).Should(BeNil())

q := qs[0]
Ω(q.Name).ShouldNot(Equal(""))
Ω(q.Node).ShouldNot(BeNil())
Ω(q.Durable).ShouldNot(BeNil())
Ω(q.Status).ShouldNot(BeNil())
Ω(q.MessagesDetails.Samples[0]).ShouldNot(BeNil())
})
})

Context("GET /queues paged with arguments", func() {
It("returns decoded response", func() {
Expand Down

0 comments on commit 9c08214

Please sign in to comment.