Skip to content

Commit 145cb8f

Browse files
DerekFrankk8s-publishing-bot
authored andcommitted
gofmt and review feedback
Kubernetes-commit: 4a40ddf1e6b6ec907a2875f0427e129de4bd789f
1 parent ddcdc12 commit 145cb8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/leaderelection/resourcelock/leaselock_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ func TestUpdateWithNilLabelsOnLease(t *testing.T) {
278278
t.Fatalf("Failed to get lease: %v", err)
279279
}
280280

281+
leaseLock.lease.Labels = nil
282+
281283
leaseLock.Labels = map[string]string{"custom-key": "custom-val"}
282284

283285
// Update should succeed even with nil Labels on the lease itself
@@ -286,7 +288,6 @@ func TestUpdateWithNilLabelsOnLease(t *testing.T) {
286288
}
287289
}
288290

289-
290291
func TestUpdateWithNilLabelsOnLeaseLock(t *testing.T) {
291292
setup()
292293

@@ -299,6 +300,8 @@ func TestUpdateWithNilLabelsOnLeaseLock(t *testing.T) {
299300
t.Fatalf("Failed to get lease: %v", err)
300301
}
301302

303+
leaseLock.Labels = nil
304+
302305
leaseLock.lease.Labels = map[string]string{"custom-key": "custom-val"}
303306

304307
// Update should succeed even with nil Labels on the leaselock
@@ -371,4 +374,4 @@ func TestLabelUpdate(t *testing.T) {
371374
if val != "custom-val-2" {
372375
t.Errorf("Label value mismatch, got %q want %q", val, "custom-val-2")
373376
}
374-
}
377+
}

0 commit comments

Comments
 (0)