-
Notifications
You must be signed in to change notification settings - Fork 598
conformance: add Hook in ConformanceTestSuite #3786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/approve thanks ! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: arkodg, zirain 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:
Approvers can indicate their approval by writing |
I think this is okay, as it only runs after the test has been completed. It's super important that we don't allow hooks before, as we don't want the behavior of the conformance tests to be able to be modified (or else we can't be sure that the same behavior is executed for every implementation, defeating the point of conformance). I won't LGTM though, as I'd like @mlavacca to confirm he's okay with this. Holding for his review. /hold |
I want to clearify that, we want this to run dump function for debugging a flaky test. |
Thanks @zirain! /lgtm FYI @spencerhance @SinaChavoshi in case this is helpful on inference extension tests |
Missed this, will leave the hold in place for @mlavacca. |
@mlavacca can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zirain lgtm as well with a tiny nit.
// call the hook function if it was provided, | ||
// this's useful for running custom logic after each test, | ||
// such as collecting current state of the cluster for debugging. | ||
if suite.Hook != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is it only useful on the suite level, meaning it will run the same hook for each test? or there is value in doing it on a more granular level like tests/profile/supportedFeature etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's for suite level.
For specified test, you can use t.Cleanup()
Signed-off-by: zirain <zirain2009@gmail.com>
/lgtm |
@youngnick can we remove the hold? |
I'd still like @mlavacca to take a look, I'll ping him. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, @zirain! What's missing here is the value in the Options
struct to build a suite with a hook value by using the NewConformanceTestSuite
helper.
Apart from that, the PR looks good to me 👍🏻
Signed-off-by: zirain <zirain2009@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @zirain!
/lgtm
/unhold
What type of PR is this?
/kind feature
/kind test
/area conformance-test
What this PR does / why we need it:
Add hook points support in conformance test suite
Which issue(s) this PR fixes:
Fixes #3131
Does this PR introduce a user-facing change?: