Repository navigation
Conversation
…s hooks Signed-off-by: prafull01 <[email protected]>
95081c4 to
8359e00
Compare
|
Can you please write a unit test for |
|
IMHO execHook function can not be properly covered with unit tests. The execHook function creates hooks resources reading from the release and deletes the successful/failed hooks resources based on the delete policy. Unless I can check that a particular resources is created or deleted (as per delete policy) after running the Do you have any pointer, how can I write unit tests for this function? |
|
@bacongobbler Can you please have a look at above comment. Thanks :) |
|
Line 17 in 4d2e21e You could wrap the FailingKubeClient to mark each resource that enters |
|
@bacongobbler @prafull01 Hi! 👋🏻 I have a pull request with this change and tests added: #11334 Could you please check it? |
|
As this PR has had no responses and there's another PR that has the requested changes, I'm closing this in favor of #11334. |
closes #10279
What this PR does / why we need it:
Currently, In case of multiple hooks if any of the hook fail, only that hook is deleted (if deletion policy is set). The other hooks are not deleted because code immediately returns error after cleaning up failed hook.
This PR adds mechanism to not only clean the failed hook, but clean the successful hook as well based on their deletion policy
Special notes for your reviewer:
If applicable: