Browse code

Upgrade Go to 1.6.

Signed-off-by: David Calavera <david.calavera@gmail.com>

David Calavera authored on 2016/02/18 09:05:52
Showing 2 changed files
... ...
@@ -116,7 +116,7 @@ RUN set -x \
116 116
 # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
117 117
 #            will need updating, to avoid errors. Ping #docker-maintainers on IRC
118 118
 #            with a heads-up.
119
-ENV GO_VERSION 1.5.3
119
+ENV GO_VERSION 1.6
120 120
 RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \
121 121
 	| tar -xzC /usr/local
122 122
 ENV PATH /go/bin:/usr/local/go/bin:$PATH
... ...
@@ -6,15 +6,16 @@ import (
6 6
 )
7 7
 
8 8
 func TestParseHost(t *testing.T) {
9
-	invalid := map[string]string{
10
-		"anything":              "Invalid bind address format: anything",
11
-		"something with spaces": "Invalid bind address format: something with spaces",
12
-		"://":                "Invalid bind address format: ://",
13
-		"unknown://":         "Invalid bind address format: unknown://",
14
-		"tcp://:port":        "Invalid bind address format: :port",
15
-		"tcp://invalid":      "Invalid bind address format: invalid",
16
-		"tcp://invalid:port": "Invalid bind address format: invalid:port",
9
+	invalid := []string{
10
+		"anything",
11
+		"something with spaces",
12
+		"://",
13
+		"unknown://",
14
+		"tcp://:port",
15
+		"tcp://invalid",
16
+		"tcp://invalid:port",
17 17
 	}
18
+
18 19
 	valid := map[string]string{
19 20
 		"":                         DefaultHost,
20 21
 		" ":                        DefaultHost,
... ...
@@ -37,11 +38,12 @@ func TestParseHost(t *testing.T) {
37 37
 		"npipe:////./pipe/foo":     "npipe:////./pipe/foo",
38 38
 	}
39 39
 
40
-	for value, errorMessage := range invalid {
41
-		if _, err := ParseHost(false, value); err == nil || err.Error() != errorMessage {
42
-			t.Errorf("Expected an error for %v with [%v], got [%v]", value, errorMessage, err)
40
+	for _, value := range invalid {
41
+		if _, err := ParseHost(false, value); err == nil {
42
+			t.Errorf("Expected an error for %v, got [nil]", value)
43 43
 		}
44 44
 	}
45
+
45 46
 	for value, expected := range valid {
46 47
 		if actual, err := ParseHost(false, value); err != nil || actual != expected {
47 48
 			t.Errorf("Expected for %v [%v], got [%v, %v]", value, expected, actual, err)