Merge pull request #82733 from yutedz/webhook-invocation-len
Check the length of recorder.invocations
This commit is contained in:
@@ -327,8 +327,10 @@ func testWebhookTimeout(t *testing.T, watchCache bool) {
|
||||
}
|
||||
}
|
||||
|
||||
for _, invocation := range recorder.invocations[len(tt.expectInvocations):] {
|
||||
t.Errorf("unexpected invocation of %s", invocation.path)
|
||||
if len(recorder.invocations) > len(tt.expectInvocations) {
|
||||
for _, invocation := range recorder.invocations[len(tt.expectInvocations):] {
|
||||
t.Errorf("unexpected invocation of %s", invocation.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user