Remove Job from Info API#12266
Conversation
daemon/info.go
Outdated
There was a problem hiding this comment.
Even if the result is just an array of strings, let's either create a new type in api/types or just use []string instead of engine.Env because I'm hoping engine.Env goes away, eventually.
There was a problem hiding this comment.
Is there any reason we're not typing all of the results here? IOW, create a real struct for all of the data with the proper types info.
api/server/server.go
Outdated
There was a problem hiding this comment.
It is better to use simple form without else. Also it is recommended by google:
https://code.google.com/p/go-wiki/wiki/CodeReviewComments#Indent_Error_Flow
api/server/server.go
Outdated
There was a problem hiding this comment.
Just pass info, should work.
|
Ok for me. What about test? Maybe there is already some in |
|
I am plan to add a new file integration-cli/docker_api_info_test.go to do the test. It's on the way. |
|
Test ready. @LK4D4 @jfrazelle Since the CLI command |
|
Please squash your commits down to one. |
There was a problem hiding this comment.
sockRequest changed signature in master. Now you can get StatusCode and check it. Also maybe makes sense to unmarshall body to some temp structure for checking that important fields is in there.
|
@duglin I'll do it. |
|
I'm trying to fix this CI error: |
api/client/info.go
Outdated
There was a problem hiding this comment.
I don't think we need this error message here since we're returning error below.
Maybe update the error with this extra info, though?
|
:( needs rebase. |
|
@cpuguy83 rebased |
There was a problem hiding this comment.
Can we have simple test for cli too? Because it was changed. Or maybe there is already tests?
There was a problem hiding this comment.
We have it under integration-cli/docker_cli_info_test.go
|
LGTM |
Two main things - Create a real struct Info for all of the data with the proper types - Add test for REST API get info Signed-off-by: Hu Keping <[email protected]>
|
LGTM |
a part of issue #12151
Signed-off-by: Hu Keping [email protected]