Browse code

cli_info_test: Check all required fields

`TestInfoEnsureSucceeds` is supposed to check existence of all
expected fields that are going to be shown in `docker info` command.

If this list was complete, it could have helped catching the missing
`"Logging Driver:"` regression.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>

Ahmet Alp Balkan authored on 2015/04/09 20:01:39
Showing 1 changed files
... ...
@@ -14,7 +14,18 @@ func TestInfoEnsureSucceeds(t *testing.T) {
14 14
 		t.Fatalf("failed to execute docker info: %s, %v", out, err)
15 15
 	}
16 16
 
17
-	stringsToCheck := []string{"Containers:", "Execution Driver:", "Logging Driver:", "Kernel Version:"}
17
+	// always shown fields
18
+	stringsToCheck := []string{
19
+		"ID:",
20
+		"Containers:",
21
+		"Images:",
22
+		"Execution Driver:",
23
+		"Logging Driver:",
24
+		"Operating System:",
25
+		"CPUs:",
26
+		"Total Memory:",
27
+		"Kernel Version:",
28
+		"Storage Driver:"}
18 29
 
19 30
 	for _, linePrefix := range stringsToCheck {
20 31
 		if !strings.Contains(out, linePrefix) {