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
+5 -4
View File
@@ -25,6 +25,7 @@ import (
flag "github.com/spf13/pflag"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
factorymocks "github.com/vmware-tanzu/velero/pkg/client/mocks"
@@ -52,15 +53,15 @@ func TestNewDeleteCommand(t *testing.T) {
args := []string{"bk-loc-1", "bk-loc-2"}
e := o.Complete(f, args)
assert.NoError(t, e)
require.NoError(t, e)
e = o.Validate(c, f, args)
assert.NoError(t, e)
require.NoError(t, e)
c.SetArgs([]string{"bk-1", "--confirm"})
e = c.Execute()
assert.NoError(t, e)
require.NoError(t, e)
e = Run(f, o)
assert.NoError(t, e)
require.NoError(t, e)
if os.Getenv(cmdtest.CaptureFlag) == "1" {
return
}