kubernetes-sigs / e2e-framework

A Go framework for end-to-end testing of components running in Kubernetes clusters.
Apache License 2.0
529 stars 103 forks source link

fixed broken exit code settings during panic recovery #342

Closed harshanarayana closed 1 year ago

harshanarayana commented 1 year ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

Set the valid return code after recovering from a panic under the setup handlers so that the test suite is marked as failed instead of being wrongly marked as successful.

Which issue(s) this PR fixes:

Fixes #328

Special notes for your reviewer:

NA

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., Usage docs, etc.:

NONE
harshanarayana commented 1 year ago

/retest

harshanarayana commented 1 year ago

/cc @vladimirvivien

vladimirvivien commented 1 year ago

Thanks @harshanarayana for this simple but valuable contribution.

/lgtm

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshanarayana, vladimirvivien

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/e2e-framework/blob/main/OWNERS)~~ [harshanarayana,vladimirvivien] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment