Skip to content

Commit ad6b8cb

Browse files
committed
add testcase for an empty backup slice
1 parent 6a14a9a commit ad6b8cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/cmd/volume/backup/list/list_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ func TestOutputResult(t *testing.T) {
213213
},
214214
wantErr: false,
215215
},
216+
{
217+
name: "empty slice",
218+
args: args{
219+
backups: []iaas.Backup{},
220+
},
221+
wantErr: false,
222+
},
216223
}
217224
p := print.NewPrinter()
218225
p.Cmd = NewCmd(&params.CmdParams{Printer: p})

0 commit comments

Comments
 (0)