mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 06:26:44 +00:00
Fix the typecheck error reported by the lint GitHub action.
Signed-off-by: Xun Jiang <blackpigletbruce@gmail.com>
This commit is contained in:
@@ -62,15 +62,15 @@ func TestDeleteCommand(t *testing.T) {
|
||||
args := []string{backup1, backup2}
|
||||
|
||||
e := o.Complete(f, args)
|
||||
require.Equal(t, nil, e)
|
||||
require.NoError(t, e)
|
||||
|
||||
e = o.Validate(c, f, args)
|
||||
require.Equal(t, nil, e)
|
||||
require.NoError(t, e)
|
||||
|
||||
Run(o)
|
||||
|
||||
e = c.Execute()
|
||||
require.Equal(t, nil, e)
|
||||
require.NoError(t, e)
|
||||
|
||||
if os.Getenv(cmdtest.CaptureFlag) == "1" {
|
||||
return
|
||||
|
||||
@@ -148,7 +148,7 @@ func TestCreateCommand_Run(t *testing.T) {
|
||||
|
||||
o.Complete(args, f)
|
||||
e := o.Validate(c, args, f)
|
||||
assert.Equal(t, e, nil)
|
||||
assert.Nil(t, e)
|
||||
|
||||
e = o.Run(c, f)
|
||||
assert.Contains(t, e.Error(), fmt.Sprintf("%s: no such file or directory", caCertFile))
|
||||
|
||||
@@ -66,7 +66,7 @@ func TestNewSetCommand(t *testing.T) {
|
||||
args := []string{backupName}
|
||||
o.Complete(args, f)
|
||||
e := o.Validate(c, args, f)
|
||||
assert.Equal(t, e, nil)
|
||||
assert.Nil(t, e)
|
||||
|
||||
e = o.Run(c, f)
|
||||
assert.Contains(t, e.Error(), fmt.Sprintf("%s: no such file or directory", cacert))
|
||||
|
||||
@@ -62,15 +62,15 @@ func TestDeleteCommand(t *testing.T) {
|
||||
args := []string{restore1, restore2}
|
||||
|
||||
e := o.Complete(f, args)
|
||||
require.Equal(t, nil, e)
|
||||
require.NoError(t, e)
|
||||
|
||||
e = o.Validate(c, f, args)
|
||||
require.Equal(t, nil, e)
|
||||
require.NoError(t, e)
|
||||
|
||||
Run(o)
|
||||
|
||||
e = c.Execute()
|
||||
require.Equal(t, nil, e)
|
||||
require.NoError(t, e)
|
||||
|
||||
if os.Getenv(cmdtest.CaptureFlag) == "1" {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user