Skip to content

Commit

Permalink
Address type assertion possible panic in test code.
Browse files Browse the repository at this point in the history
Signed-off-by: Aly Nathoo <[email protected]>
  • Loading branch information
anathoodell committed Dec 6, 2024
1 parent 4e989b4 commit b463656
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/shared/crclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ func (f Client) listPodList(list *corev1.PodList) error {
func (f Client) listNodeList(list *corev1.NodeList) error {
for k, v := range f.Objects {
if k.Kind == "Node" {
list.Items = append(list.Items, *v.(*corev1.Node))
node, ok := v.(*corev1.Node)
if ok {
list.Items = append(list.Items, *node)
}
}
}
return nil
Expand Down

0 comments on commit b463656

Please sign in to comment.