fix require-error rule from testifylint

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-06-23 15:39:54 +00:00
parent 3024e6223e
commit 07ea14962c
99 changed files with 483 additions and 440 deletions
+2 -2
View File
@@ -130,7 +130,7 @@ func TestExecutePodCommandMissingInputs(t *testing.T) {
err := e.ExecutePodCommand(velerotest.NewLogger(), test.item, test.podNamespace, test.podName, test.hookName, test.hook)
if hookPodContainerNotSame && test.hook.Container == pod.Spec.Containers[0].Name {
assert.Error(t, fmt.Errorf("hook exec container is overwritten"))
require.Error(t, fmt.Errorf("hook exec container is overwritten"))
}
assert.Error(t, err)
})
@@ -257,7 +257,7 @@ func TestEnsureContainerExists(t *testing.T) {
}
err := ensureContainerExists(pod, "bar")
assert.EqualError(t, err, `no such container: "bar"`)
require.EqualError(t, err, `no such container: "bar"`)
err = ensureContainerExists(pod, "foo")
assert.NoError(t, err)