-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add format option to server ls command #383
Conversation
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.
fairly straightforward change, but can you add a unit test for this as well?
@crobby Lines 230 to 237 in f5d2eaa
|
If you can add something like that, I think there is at least some value in it. I do agree that the "main logic" is indeed already tested here. |
@crobby Sure, just added. Also, I set the functions inside the object to |
cmd/server_test.go
Outdated
) | ||
|
||
func TestServerCommand(t *testing.T) { |
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.
TBH I'm not sure why we need such a test. This is brittle and doesn't really test any functionality. I'd rather not have it at all.
/cc @crobby
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.
I see your point. Maybe it would be fine to just remove the test and merge as it was.
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.
@john801205 Sorry for the back-and-forth. Can you please revert the unit test changes and we'll merge the PR?
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.
Sure, no problem. I have reverted the change.
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.
Thank you!
This reverts commit 5218715.
f45a1f6
Ref: rancher/rancher#48169
Summary
This PR allows users to specify format for the server ls command.
Usage