-
Notifications
You must be signed in to change notification settings - Fork 2k
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 services names in a natural order #357
Conversation
Codecov Report
@@ Coverage Diff @@
## master #357 +/- ##
==========================================
+ Coverage 45.47% 45.78% +0.31%
==========================================
Files 193 193
Lines 16061 16065 +4
==========================================
+ Hits 7304 7356 +52
+ Misses 8379 8323 -56
- Partials 378 386 +8 |
cli/command/service/list_test.go
Outdated
"github.com/docker/docker/api/types" | ||
"github.com/docker/docker/api/types/swarm" | ||
"github.com/docker/docker/pkg/testutil" | ||
"github.com/moby/moby/pkg/testutil/golden" |
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.
docker/docker/pkg/testutil/golden
cli/command/service/list_test.go
Outdated
|
||
func TestServiceListOrder(t *testing.T) { | ||
buf := new(bytes.Buffer) | ||
cli := test.NewFakeCliWithOutput(&fakeClient{ |
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.
NewFakeCliWithOutput
is deprecated. Please use NewFakeCli()
. It defaults to an output buffer.
You can get the buffer from cli.OutBuffer()
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
LGTM |
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.
LGTM 🐯
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.
LGTM
Follow-up to #315
@aaronlehmann Let me know if there are other resources that need to be natural-sorted.
- What I did
Use natural sorting to display swarm services
- How I did it
Using the
sortorder.NaturalLess
function and theSort
interface- How to verify it