-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a rand parameter to the storage service
This modification enables the use of a custom random number generator in our tests. It eliminates the need to alter global state in the `github.com/google/uuid` package, which is unsafe during parallel testing. We continue to utilize `crypto/rand`, but now it must be explicitly passed to the service. We maintain the assumption that the operation will succeed, and will trigger a panic otherwise, to mirror the behavior of `uuid.New`. We have implemented middleware to manage panics, thus mitigating concerns in the unlikely event of such failures.
- Loading branch information
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters