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

CLOUDP-259458: Sort tags alphabetically #55

Merged
merged 4 commits into from
Jul 3, 2024
Merged

CLOUDP-259458: Sort tags alphabetically #55

merged 4 commits into from
Jul 3, 2024

Conversation

blva
Copy link
Collaborator

@blva blva commented Jul 2, 2024

Proposed changes

Jira ticket: CLOUDP-259458

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Further comments

@blva blva marked this pull request as ready for review July 2, 2024 17:07
@blva blva requested a review from a team as a code owner July 2, 2024 17:07
@blva blva requested a review from gssbzn July 3, 2024 08:57
Comment on lines +339 to +343
assert.Equal(t, len(o.base.Spec.Tags), len(tc.expectedTags))
// check tag names are the same
for i := range o.base.Spec.Tags {
assert.Equal(t, o.base.Spec.Tags[i].Name, tc.expectedTags[i].Name)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

wouldn't the following do the same? it should account for order

Suggested change
assert.Equal(t, len(o.base.Spec.Tags), len(tc.expectedTags))
// check tag names are the same
for i := range o.base.Spec.Tags {
assert.Equal(t, o.base.Spec.Tags[i].Name, tc.expectedTags[i].Name)
}
assert.Equal(t, tc.expectedTags, o.base.Spec.Tags))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no it doesn't work as it is a list of objects, it complains about the addresses

Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM

@blva blva merged commit c23c69e into main Jul 3, 2024
6 checks passed
@blva blva deleted the sort-tags branch July 3, 2024 09:16
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