Skip to content

Commit f09589e

Browse files
committed
Simplify itControllerRingShouldBeReady
1 parent e839509 commit f09589e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/e2e/example_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var _ = Describe("Example Controller", Label(checksumControllerName), func() {
6969
))
7070
}, SpecTimeout(ShortTimeout))
7171

72-
itControllerRingShouldBeReady(3, 3)
72+
itControllerRingShouldBeReady()
7373
itShouldGetReadyShards(3)
7474

7575
It("there should not be any shard leases other than the 3 ready leases", func(ctx SpecContext) {
@@ -117,7 +117,7 @@ var _ = Describe("Example Controller", Label(checksumControllerName), func() {
117117
}}
118118
})
119119

120-
itControllerRingShouldBeReady(3, 3)
120+
itControllerRingShouldBeReady()
121121
itShouldGetReadyShards(3)
122122

123123
It("should assign the main object to a healthy shard", func(ctx SpecContext) {
@@ -194,7 +194,7 @@ var _ = Describe("Example Controller", Label(checksumControllerName), func() {
194194
*lease = *newLease(60)
195195
})
196196

197-
itControllerRingShouldBeReady(3, 3)
197+
itControllerRingShouldBeReady()
198198

199199
itShouldCreateShardLease(lease)
200200
itShardShouldHaveState(lease, leases.Ready)
@@ -217,7 +217,7 @@ var _ = Describe("Example Controller", Label(checksumControllerName), func() {
217217
*lease = *newLease(10)
218218
})
219219

220-
itControllerRingShouldBeReady(3, 3)
220+
itControllerRingShouldBeReady()
221221

222222
itShouldCreateShardLease(lease)
223223
itShardShouldHaveState(lease, leases.Ready)
@@ -242,7 +242,7 @@ var _ = Describe("Example Controller", Label(checksumControllerName), func() {
242242

243243
func describeScaleController(text string, replicas int32) {
244244
Describe(text, Ordered, func() {
245-
itControllerRingShouldBeReady(3, 3)
245+
itControllerRingShouldBeReady()
246246
itShouldGetReadyShards(3)
247247

248248
objectLabels := itShouldCreateObjects()
@@ -256,13 +256,13 @@ func describeScaleController(text string, replicas int32) {
256256
})
257257
}
258258

259-
func itControllerRingShouldBeReady(expectedShards, expectedAvailableShards int) {
259+
func itControllerRingShouldBeReady() {
260260
GinkgoHelper()
261261

262262
It("the ControllerRing should be ready", func(ctx SpecContext) {
263263
Eventually(ctx, Object(controllerRing)).Should(And(
264-
HaveField("Status.Shards", BeEquivalentTo(expectedShards)),
265-
HaveField("Status.AvailableShards", BeEquivalentTo(expectedAvailableShards)),
264+
HaveField("Status.Shards", BeEquivalentTo(3)),
265+
HaveField("Status.AvailableShards", BeEquivalentTo(3)),
266266
HaveField("Status.Conditions", ConsistOf(
267267
MatchCondition(
268268
OfType(shardingv1alpha1.ControllerRingReady),

0 commit comments

Comments
 (0)