mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Check the length of recorder.invocations
This commit is contained in:
parent
8126201b73
commit
5e5824f9c5
@ -327,8 +327,10 @@ func testWebhookTimeout(t *testing.T, watchCache bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, invocation := range recorder.invocations[len(tt.expectInvocations):] {
|
if len(recorder.invocations) > len(tt.expectInvocations) {
|
||||||
t.Errorf("unexpected invocation of %s", invocation.path)
|
for _, invocation := range recorder.invocations[len(tt.expectInvocations):] {
|
||||||
|
t.Errorf("unexpected invocation of %s", invocation.path)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user