testifylint: enable error-nil rule (#7670)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-07-16 12:23:16 -04:00
committed by GitHub
parent aa3fde5ea5
commit 35c90f1672
58 changed files with 218 additions and 219 deletions
+2 -2
View File
@@ -732,7 +732,7 @@ func TestWaitExecHandleHooks(t *testing.T) {
for _, e := range test.expectedExecutions {
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(e.pod)
assert.Nil(t, err)
assert.NoError(t, err)
podCommandExecutor.On("ExecutePodCommand", mock.Anything, obj, e.pod.Namespace, e.pod.Name, e.name, e.hook).Return(e.error)
}
@@ -1269,7 +1269,7 @@ func TestRestoreHookTrackerUpdate(t *testing.T) {
for _, e := range test.expectedExecutions {
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(e.pod)
assert.Nil(t, err)
assert.NoError(t, err)
podCommandExecutor.On("ExecutePodCommand", mock.Anything, obj, e.pod.Namespace, e.pod.Name, e.name, e.hook).Return(e.error)
}