mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Add unit test case for empty list
This commit is contained in:
parent
3b6d8e8373
commit
bb9ea69195
@ -560,6 +560,15 @@ func TestRuntimeSorter(t *testing.T) {
|
||||
expect string
|
||||
expectError string
|
||||
}{
|
||||
{
|
||||
name: "ensure sorter works with an empty object list",
|
||||
field: "metadata.name",
|
||||
objs: []runtime.Object{},
|
||||
op: func(sorter *RuntimeSorter, objs []runtime.Object, out io.Writer) error {
|
||||
return nil
|
||||
},
|
||||
expect: "",
|
||||
},
|
||||
{
|
||||
name: "ensure sorter returns original position",
|
||||
field: "metadata.name",
|
||||
|
Loading…
Reference in New Issue
Block a user