Merge pull request #127679 from mmorel-35/testifylint/nil-compare@k8s.io/endpointslice

fix: enable error-nil and nil-compare rules from testifylint in module `k8s.io/endpointslice`
This commit is contained in:
Kubernetes Prow Robot 2024-09-29 08:04:02 +01:00 committed by GitHub
commit 3c1e9d7dcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -580,7 +580,7 @@ func TestReconcile1EndpointSlice(t *testing.T) {
if tc.existing != nil {
existingSlices = append(existingSlices, tc.existing)
_, createErr := client.DiscoveryV1().EndpointSlices(namespace).Create(context.TODO(), tc.existing, metav1.CreateOptions{})
assert.Nil(t, createErr, "Expected no error creating endpoint slice")
assert.NoError(t, createErr, "Expected no error creating endpoint slice")
}
numActionsBefore := len(client.Actions())