Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/extended/util/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,13 @@ func GetRouterPodTemplate(oc *CLI) (*corev1.PodTemplateSpec, string, error) {
if !errors.IsNotFound(err) {
return nil, "", err
}
ds, err := k8sappsclient.DaemonSets(ns).Get("router-default", metav1.GetOptions{})
if err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can error be nil and still have an empty DaemonSet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No error means a valid DaemonSet.
Did you mean to ask for the case the DaemonSet doesn't exist and it would return nil here?
In that case, there'd be a daemonset not found error returned.

return &ds.Spec.Template, ns, nil
}
if !errors.IsNotFound(err) {
return nil, "", err
}
}
return nil, "", errors.NewNotFound(schema.GroupResource{Group: "apps.openshift.io", Resource: "deploymentconfigs"}, "router")
}
Expand Down