Skip to content
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

Allow cleaning up when test finished OK or FAILED #275

Open
aaguilartablada opened this issue Aug 22, 2023 · 2 comments
Open

Allow cleaning up when test finished OK or FAILED #275

aaguilartablada opened this issue Aug 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@aaguilartablada
Copy link

aaguilartablada commented Aug 22, 2023

Feature Description

I'd like to be able to tell the operator to clean K6 objects when the test is OK and not when the test has FAILED as I want to debug and I can't do it if cleaning process is performed always when configured.

Suggested Solution (optional)

The suggested solution is giving more possibilities to 'cleanup' property. The idea is 'cleanup' can be set to:

  • 'post' if you want to delete K6 object when the test is over regardless of whether it has finished successfully or not (current behavior).
  • 'whenOk' if you want to delete K6 object when the test is over and it has finished successfully.
  • 'whenFailed' if you want to delete K6 object when the test is over and it has finished with error.

Already existing or connected issues / PRs (optional)

#276

@yorugac
Copy link
Collaborator

yorugac commented Aug 22, 2023

@aaguilartablada, thank you! This problem is related to something I've been pondering lately myself; I agree we should improve this 👍
Somewhat related issue: #260

Going by your PR, it seems like you already have an API suggestion: could you please add it to the issue description first? Thanks!

@yorugac
Copy link
Collaborator

yorugac commented Aug 22, 2024

'post' if you want to delete K6 object when the test is over regardless of whether it has finished successfully or not (current behavior).
'whenOk' if you want to delete K6 object when the test is over and it has finished successfully.
'whenFailed' if you want to delete K6 object when the test is over and it has finished with error.

This looks somewhat redundant actually: the described use case with leaving resource only on error makes sense, but in which cases one would want to use "whenFailed"? I suggest to have instead these:

  1. cleanup: "post" - clean up all test runs
  2. cleanup: "success" - clean up only successful test runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants