knative / serving-operator

DEPRECATED: Development continues in https://github.com/knative/operator/
Apache License 2.0
39 stars 48 forks source link

Add nil check as well as IsNotFound check #367

Closed nak3 closed 4 years ago

nak3 commented 4 years ago

Proposed Changes

This patch adds nil check as well as !apierrs.IsNotFound.

Without it TestKnativeServingDeployment gets following failed status when the resources do not exist.

    --- FAIL: TestKnativeServingDeployment/delete (10.37s)
        verify.go:216: The ClusterRole knative-serving-admin failed to be deleted: <nil>

/lint

You can refer to the logs, which happened on OpenShift CI.

Release Note

NONE
knative-prow-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nak3 To complete the pull request process, please assign trshafer You can assign the PR to them by writing /assign @trshafer in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/knative/serving-operator/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment