Fix linting issue in test

Lint error was introduced in
https://github.com/kubernetes/kubernetes/pull/128305 and backported in https://github.com/kubernetes/kubernetes/pull/128806

It was merged before I could fix it, so I thought I'd make a follow up
PR to fix it.

I won't be backporting this lint as it's only in tests (unless it makes
sense to backport?)
This commit is contained in:
Adrian Moisey 2024-11-19 12:20:02 +02:00
parent 021dbe9d19
commit 90922f5c94
No known key found for this signature in database
GPG Key ID: 41AE4AE32747C7CF

View File

@ -926,7 +926,9 @@ func TestNodeDeletionReleaseCIDR(t *testing.T) {
rangeAllocator.nodesSynced = test.AlwaysReady
rangeAllocator.recorder = testutil.NewFakeRecorder()
rangeAllocator.syncNode(tCtx, tc.nodeKey)
if err := rangeAllocator.syncNode(tCtx, tc.nodeKey); err != nil {
t.Fatalf("failed to run rangeAllocator.syncNode")
}
if len(rangeAllocator.cidrSets) != 1 {
t.Fatalf("Expected a single cidrSet, but got %d", len(rangeAllocator.cidrSets))