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

vault-23135 - fix modify storage keys ending with .temp causes overwr… #25395

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

hghaf099
Copy link
Contributor

Addresses #23135

Instead of hardcoded .temp suffix, randomize the suffix to make sure it is not overwriting an existing file.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Feb 13, 2024
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@raskchanky raskchanky left a comment

Choose a reason for hiding this comment

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

I couldn't resist one tiny nitpick to plug my favorite testing function 😆. This looks great! Thanks for tackling this!

if err != nil {
t.Fatalf("err: %s", err)
}
defer os.RemoveAll(dir)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is super nitpicky, but if you use t.TempDir() here, you can avoid error handling and cleanup, as all of that is automatic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants