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

Sort the queue list for in-memory repository #142

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented Jun 25, 2021

This PR sorts the queue list of FindAll() for in-memory repository. There is already tests for the name ordering, which randomly fail.

{
qs, err := repo.Queue.FindAll()
if err != nil {
t.Error(err)
}
if len(qs) != 2 {
t.Error("There should be defined queues")
}
if qs[0].Name != "repo_queue_test_queue_2" {
t.Error("Defined queues can be retrieved in name order")
}
if qs[1].Name != "repo_queue_test_queue_3" {
t.Error("Defined queues can be retrieved in name order")
}
}

@itchyny itchyny self-assigned this Jun 25, 2021
Copy link
Member

@tarao tarao left a comment

Choose a reason for hiding this comment

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

@itchyny LGTM

@itchyny
Copy link
Contributor Author

itchyny commented Jun 25, 2021

Thank you.

@itchyny itchyny merged commit 6ea34ea into master Jun 25, 2021
@itchyny itchyny deleted the fix-in-memory-repo-sort branch June 25, 2021 08:29
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.

None yet

2 participants