mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-26 18:04:31 +00:00
fix require-error rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user