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

refactor: generated UUID variant & version test #2793

Merged
merged 2 commits into from
Oct 13, 2021

Conversation

grantzvolsky
Copy link
Contributor

Related issue(s)

#2792
@aeneasr

Checklist

  • I have read the contributing guidelines.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    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.
  • [n/a] I have added tests that prove my fix is effective or that my feature
    works.
  • [n/a] I have added or changed the documentation.

Further Comments

@@ -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)
Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

Yes :)

Copy link
Contributor Author

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
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

❗ No coverage uploaded for pull request base (v2.x@09ac91b). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09ac91b...7054856. Read the comment docs.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Nice :)

@aeneasr aeneasr merged commit ed3e88f into ory:v2.x Oct 13, 2021
grantzvolsky added a commit to grantzvolsky/hydra that referenced this pull request Feb 7, 2022
grantzvolsky added a commit to grantzvolsky/hydra that referenced this pull request Mar 8, 2022
grantzvolsky added a commit that referenced this pull request May 19, 2022
aeneasr pushed a commit that referenced this pull request Jun 27, 2022
grantzvolsky added a commit that referenced this pull request Aug 1, 2022
aeneasr pushed a commit that referenced this pull request Aug 1, 2022
aeneasr pushed a commit that referenced this pull request Aug 18, 2022
aeneasr pushed a commit that referenced this pull request Sep 5, 2022
aeneasr pushed a commit that referenced this pull request Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants