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

Don't return error when deleting non-existent CA cert file #2395

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

jamie-suse
Copy link
Contributor

Description

Relates to #2391

If the SUMA GenServer attempts to delete a certificate file that doesn't exist, it will return an error status. This should not be considered an error case for our use-case and so we should use File.rm_rf/1 instead, which specifically ignores this.

This behaviour/symptom also surfaced with some flakiness in the test "should not save CA certificate file if no cert is provided", where sometimes Suma.setup(@test_integration_name) returned the aforementioned {:error, :enoent}, due to the nondeterministic nature of the order of operations.

How was this tested?

Flakiness of unit test "should not save CA certificate file if no cert is provided" should be fixed.

@jamie-suse jamie-suse added bug Something isn't working elixir Pull requests that update Elixir code labels Mar 7, 2024
@jamie-suse jamie-suse self-assigned this Mar 7, 2024
Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough

@jamie-suse jamie-suse merged commit 327ac83 into main Mar 7, 2024
32 checks passed
@jamie-suse jamie-suse deleted the clear-ca_cert branch March 7, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working elixir Pull requests that update Elixir code
Development

Successfully merging this pull request may close these issues.

None yet

3 participants