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

Ensure clean-up for func tests #175

Closed
dashmage opened this issue Feb 27, 2024 · 3 comments
Closed

Ensure clean-up for func tests #175

dashmage opened this issue Feb 27, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@dashmage
Copy link
Contributor

In the test_config_changed_port and test_config_changed_log_level tests, the clean-up steps

await app.reset_config(["exporter-port"])

may not execute in case of a failure in any of the previous lines of code.

In order to fix this, we would need a cleanup phase where even if an error occurs, the cleanup will happen before the test exits.

@dashmage
Copy link
Contributor Author

The addCleanup method could be used for this purpose if we define the TestCharm as a TestCase.

@Pjack
Copy link

Pjack commented Dec 16, 2024

The code has changed, and it’s unlikely this issue will be addressed in the future. I’ll close the ticket for now, but feel free to reopen it if anyone wants to enhance this part.

@Pjack Pjack closed this as completed Dec 16, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/SOLENG-995.

This message was autogenerated

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