fixes #7802, when api version 1.11 is json.Marshaling the container st...#7914
Conversation
|
Yes, I did this for merging mutexes :) |
|
Where should we start putting API tests?
|
|
ping @tiborvass @unclejack |
|
Also applies to the comment in #7886
|
8f6f056 to
66568b7
Compare
|
ping @LK4D4 @tiborvass @unclejack Added a test, also this PR and #7886 add the |
There was a problem hiding this comment.
It is pretty confusing to have named returns in this case, because I always need to look what the hell is body now. I prefer to return just nil instead of body on errors.
|
Can we write here test that check not only state? Because I think next time error will be not in state. |
There was a problem hiding this comment.
We should add a same-line comment to say that this is needed for the remote api version <= 1.11
66568b7 to
98a67a0
Compare
|
updated ping @LK4D4 @tiborvass |
98a67a0 to
42737d1
Compare
There was a problem hiding this comment.
Hmmm, isn't this needed for all api versions?
There was a problem hiding this comment.
No because new versions use .Set("State", container.State) versus just json.Marshal-ing the struct
There was a problem hiding this comment.
No. Starting from 1.12 we set manually all the fields: https://github.com/docker/docker/blob/master/daemon/inspect.go#L19 (raw is set only for <= 1.11)
42737d1 to
948f6d4
Compare
…iner struct Signed-off-by: Jessica Frazelle <[email protected]> Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <[email protected]> (github: )
948f6d4 to
f49c3f2
Compare
|
Cool, LGTM |
|
LGTM |
fixes #7802, when api version 1.11 is `json.Marshal`ing the container st...
fixes #7802, when api version 1.11 is
json.Marshaling the container structSigned-off-by: Jessica Frazelle [email protected]