Fix the typecheck error reported by the lint GitHub action.

Signed-off-by: Xun Jiang <blackpigletbruce@gmail.com>
This commit is contained in:
Xun Jiang
2024-04-19 18:41:16 +08:00
parent 2eeaf4d55e
commit 884bcbec98
18 changed files with 141 additions and 80 deletions
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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))
+3 -3
View File
@@ -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