Skip to content

Commit 97edfe8

Browse files
committed
Simplify existing integration tests
1 parent 20ab069 commit 97edfe8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/integration/sharder/webhook/sharder/sharder_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ var _ = Describe("Shard Lease controller", func() {
5555
},
5656
}
5757

58-
availableShard = newLease(controllerRing.Name)
58+
availableShard = newLease()
5959
Expect(testClient.Create(ctx, availableShard)).To(Succeed())
6060

61-
deadShard = newLease(controllerRing.Name)
61+
deadShard = newLease()
6262
deadShard.Spec.HolderIdentity = nil
6363
Expect(testClient.Create(ctx, deadShard)).To(Succeed())
6464

@@ -177,15 +177,15 @@ var _ = Describe("Shard Lease controller", func() {
177177
})
178178
})
179179

180-
func newLease(controllerRingName string) *coordinationv1.Lease {
180+
func newLease() *coordinationv1.Lease {
181181
name := testRunID + "-" + test.RandomSuffix()
182182

183183
return &coordinationv1.Lease{
184184
ObjectMeta: metav1.ObjectMeta{
185185
Name: name,
186186
Namespace: testRunID,
187187
Labels: map[string]string{
188-
shardingv1alpha1.LabelControllerRing: controllerRingName,
188+
shardingv1alpha1.LabelControllerRing: controllerRing.Name,
189189
},
190190
},
191191
Spec: coordinationv1.LeaseSpec{

0 commit comments

Comments
 (0)