Skip to content

Commit 61736b2

Browse files
committed
Spelling, formatting
1 parent 01aec49 commit 61736b2

File tree

5 files changed

+25
-34
lines changed

5 files changed

+25
-34
lines changed

rabbitmq_amqp/amqp_connection_test.go

Lines changed: 4 additions & 4 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{}))
@@ -24,7 +24,7 @@ var _ = Describe("AMQP Connection Test", func() {
2424
Expect(err).To(BeNil())
2525
})
2626

27-
It("AMQP SASLTypePlain Connection should success", func() {
27+
It("AMQP SASLTypePlain Connection should succeed", func() {
2828
amqpConnection := NewAmqpConnection()
2929
Expect(amqpConnection).NotTo(BeNil())
3030
Expect(amqpConnection).To(BeAssignableToTypeOf(&AmqpConnection{}))
@@ -67,7 +67,7 @@ var _ = Describe("AMQP Connection Test", func() {
6767
Expect(err).NotTo(BeNil())
6868
})
6969

70-
It("AMQP Connection should fail due of context cancelled", func() {
70+
It("AMQP Connection should fail due to context cancellation", func() {
7171
amqpConnection := NewAmqpConnection()
7272
Expect(amqpConnection).NotTo(BeNil())
7373
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
@@ -76,7 +76,7 @@ var _ = Describe("AMQP Connection Test", func() {
7676
Expect(err).NotTo(BeNil())
7777
})
7878

79-
It("AMQP Connection should receive events ", func() {
79+
It("AMQP Connection should receive events", func() {
8080
amqpConnection := NewAmqpConnection()
8181
Expect(amqpConnection).NotTo(BeNil())
8282
ch := make(chan *StatusChanged, 1)

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
})

rabbitmq_amqp/amqp_management_test.go

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

1010
var _ = Describe("Management tests", func() {
11-
12-
It("AMQP Management should fail due of context cancelled", func() {
11+
It("AMQP Management should fail due to context cancellation", func() {
1312
amqpConnection := NewAmqpConnection()
1413
Expect(amqpConnection).NotTo(BeNil())
1514
err := amqpConnection.Open(context.Background(), NewConnectionSettings())
@@ -22,7 +21,7 @@ var _ = Describe("Management tests", func() {
2221
amqpConnection.Close(context.Background())
2322
})
2423

25-
It("AMQP Management should receive events ", func() {
24+
It("AMQP Management should receive events", func() {
2625
amqpConnection := NewAmqpConnection()
2726
Expect(amqpConnection).NotTo(BeNil())
2827
ch := make(chan *StatusChanged, 1)

rabbitmq_amqp/amqp_queue_test.go

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

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

30-
It("AMQP Queue Declare With Response and Delete should success ", func() {
31-
const queueName = "AMQP Queue Declare With Response and Delete should success"
29+
It("AMQP Queue Declare With Response and Delete should succeed", func() {
30+
const queueName = "AMQP Queue Declare With Response and Delete should succeed"
3231
queueSpec := management.Queue(queueName)
3332
queueInfo, err := queueSpec.Declare(context.TODO())
3433
Expect(err).To(BeNil())
@@ -42,8 +41,8 @@ var _ = Describe("AMQP Queue test ", func() {
4241
Expect(err).To(BeNil())
4342
})
4443

45-
It("AMQP Queue Declare With Parameters and Delete should success ", func() {
46-
const queueName = "AMQP Queue Declare With Parameters and Delete should success"
44+
It("AMQP Queue Declare With Parameters and Delete should succeed", func() {
45+
const queueName = "AMQP Queue Declare With Parameters and Delete should succeed"
4746
queueSpec := management.Queue(queueName).Exclusive(true).
4847
AutoDelete(true).
4948
QueueType(QueueType{Classic}).
@@ -69,8 +68,8 @@ var _ = Describe("AMQP Queue test ", func() {
6968
Expect(err).To(BeNil())
7069
})
7170

72-
It("AMQP Declare Quorum Queue and Delete should success ", func() {
73-
const queueName = "AMQP Declare Quorum Queue and Delete should success"
71+
It("AMQP Declare Quorum Queue and Delete should succeed", func() {
72+
const queueName = "AMQP Declare Quorum Queue and Delete should succeed"
7473
// Quorum queue will ignore Exclusive and AutoDelete settings
7574
// since they are not supported by quorum queues
7675
queueSpec := management.Queue(queueName).
@@ -88,8 +87,8 @@ var _ = Describe("AMQP Queue test ", func() {
8887
Expect(err).To(BeNil())
8988
})
9089

91-
It("AMQP Declare Stream Queue and Delete should success ", func() {
92-
const queueName = "AMQP Declare Stream Queue and Delete should success"
90+
It("AMQP Declare Stream Queue and Delete should succeed", func() {
91+
const queueName = "AMQP Declare Stream Queue and Delete should succeed"
9392
// Stream queue will ignore Exclusive and AutoDelete settings
9493
// since they are not supported by quorum queues
9594
queueSpec := management.Queue(queueName).
@@ -107,16 +106,15 @@ var _ = Describe("AMQP Queue test ", func() {
107106
Expect(err).To(BeNil())
108107
})
109108

110-
It("AMQP Declare Queue with invalid type should fail ", func() {
109+
It("AMQP Declare Queue with invalid type should fail", func() {
111110
const queueName = "AMQP Declare Queue with invalid type should fail"
112111
queueSpec := management.Queue(queueName).
113112
QueueType(QueueType{Type: "invalid"})
114113
_, err := queueSpec.Declare(context.TODO())
115114
Expect(err).NotTo(BeNil())
116115
})
117116

118-
It("AMQP Declare Queue should fail with Precondition fail ", func() {
119-
117+
It("AMQP Declare Queue should fail with Precondition fail", func() {
120118
// The first queue is declared as Classic and it should succeed
121119
// The second queue is declared as Quorum and it should fail since it is already declared as Classic
122120
const queueName = "AMQP Declare Queue should fail with Precondition fail"
@@ -132,7 +130,6 @@ var _ = Describe("AMQP Queue test ", func() {
132130
})
133131

134132
It("AMQP Declare Queue should fail during validation", func() {
135-
136133
const queueName = "AMQP Declare Queue should fail during validation"
137134
queueSpec := management.Queue(queueName).MaxLengthBytes(-1)
138135
_, err := queueSpec.Declare(context.TODO())
@@ -149,5 +146,4 @@ var _ = Describe("AMQP Queue test ", func() {
149146
err = queueSpec.Delete(context.TODO())
150147
Expect(err).To(BeNil())
151148
})
152-
153149
})

rabbitmq_amqp/converters_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ import (
77
)
88

99
var _ = Describe("Converters", func() {
10-
11-
It("Converter from number", func() {
10+
It("Converts from number", func() {
1211
Expect(CapacityBytes(100)).To(Equal(int64(100)))
1312
Expect(CapacityKB(1)).To(Equal(int64(1000)))
1413
Expect(CapacityMB(1)).To(Equal(int64(1000 * 1000)))
1514
Expect(CapacityGB(1)).To(Equal(int64(1000 * 1000 * 1000)))
1615
Expect(CapacityTB(1)).To(Equal(int64(1000 * 1000 * 1000 * 1000)))
1716
})
1817

19-
It("Converter from string", func() {
18+
It("Converts from string", func() {
2019
v, err := CapacityFrom("1KB")
2120
Expect(err).NotTo(HaveOccurred())
2221
Expect(v).To(Equal(int64(1000)))
@@ -34,7 +33,7 @@ var _ = Describe("Converters", func() {
3433
Expect(v).To(Equal(int64(1000 * 1000 * 1000 * 1000)))
3534
})
3635

37-
It("Converter from string logError", func() {
36+
It("Converts from string logError", func() {
3837
v, err := CapacityFrom("10LL")
3938
Expect(fmt.Sprintf("%s", err)).
4039
To(ContainSubstring("Invalid unit size format"))
@@ -51,5 +50,4 @@ var _ = Describe("Converters", func() {
5150
Expect(v).To(Equal(int64(0)))
5251
Expect(err).To(BeNil())
5352
})
54-
5553
})

0 commit comments

Comments
 (0)