Browse code

SizeRW & SizeRootFs omitted if empty in /container/json call

Signed-off-by: Antonio Murdaca <runcom@linux.com>
(cherry picked from commit 6945ac2d02adbe2931c9e8756ecbb7496b43081a)

Antonio Murdaca authored on 2015/06/04 06:13:56
Showing 2 changed files
... ...
@@ -107,8 +107,8 @@ type Container struct {
107 107
 	Command    string
108 108
 	Created    int
109 109
 	Ports      []Port
110
-	SizeRw     int
111
-	SizeRootFs int
110
+	SizeRw     int `json:",omitempty"`
111
+	SizeRootFs int `json:",omitempty"`
112 112
 	Labels     map[string]string
113 113
 	Status     string
114 114
 }
... ...
@@ -71,8 +71,6 @@ func (s *DockerSuite) TestContainerApiGetJSONNoFieldsOmitted(c *check.C) {
71 71
 		"Command",
72 72
 		"Created",
73 73
 		"Ports",
74
-		"SizeRw",
75
-		"SizeRootFs",
76 74
 		"Labels",
77 75
 		"Status",
78 76
 	}