fix: enable nil-compare and error-nil rules from testifylint in module k8s.io/kubernetes

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-09-23 08:01:50 +02:00
parent f3a54b68f9
commit 27b98be303
13 changed files with 100 additions and 99 deletions

View File

@@ -42,10 +42,10 @@ func TestLocalEndpoint(t *testing.T) {
for _, test := range tests {
fullPath, err := LocalEndpoint(test.path, test.file)
if test.expectError {
assert.NotNil(t, err, "expected error")
assert.Error(t, err, "expected error")
continue
}
assert.Nil(t, err, "expected no error")
assert.NoError(t, err, "expected no error")
assert.Equal(t, test.expectedFullPath, fullPath)
}
}