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

Open
dashmage opened this issue Feb 27, 2024 · 1 comment
Open

Ensure clean-up for func tests #175

dashmage opened this issue Feb 27, 2024 · 1 comment
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.

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