-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
refactor: generated UUID variant & version test #2793
refactor: generated UUID variant & version test #2793
Conversation
@@ -82,7 +77,8 @@ func TestMigrations(t *testing.T) { | |||
actual := &client.Client{} | |||
outfacingID := fmt.Sprintf("client-%04d", i) | |||
require.NoError(t, c.Where("id = ?", outfacingID).First(actual)) | |||
assertUUID(t, &actual.ID) | |||
require.Equal(t, actual.ID.Version(), uuid.V4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be preferable to reuse assertUUID form above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 7054856. Please let me know it that works, in particular the placement in internal/testhelpers/uuid. The testhelpers/uuid
package was necessary to avoid an import cycle in testhelpers
Codecov Report
@@ Coverage Diff @@
## v2.x #2793 +/- ##
=======================================
Coverage ? 52.88%
=======================================
Files ? 237
Lines ? 14193
Branches ? 0
=======================================
Hits ? 7506
Misses ? 6054
Partials ? 633 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
Related issue(s)
#2792
@aeneasr
Checklist
contributing code guidelines.
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments