Browse code

Merge pull request #322 from thaJeztah/19.03_backport_bump_golang_1.12.8

[19.03 backport] Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514)

Andrew Hsu authored on 2019/08/15 03:55:08
Showing 6 changed files
... ...
@@ -25,7 +25,7 @@
25 25
 #
26 26
 
27 27
 ARG CROSS="false"
28
-ARG GO_VERSION=1.12.7
28
+ARG GO_VERSION=1.12.8
29 29
 
30 30
 FROM golang:${GO_VERSION}-stretch AS base
31 31
 ARG APT_MIRROR
... ...
@@ -1,4 +1,4 @@
1
-ARG GO_VERSION=1.12.7
1
+ARG GO_VERSION=1.12.8
2 2
 
3 3
 FROM golang:${GO_VERSION}-alpine AS base
4 4
 
... ...
@@ -5,7 +5,7 @@
5 5
 
6 6
 # This represents the bare minimum required to build and test Docker.
7 7
 
8
-ARG GO_VERSION=1.12.7
8
+ARG GO_VERSION=1.12.8
9 9
 
10 10
 FROM golang:${GO_VERSION}-stretch
11 11
 
... ...
@@ -165,7 +165,7 @@ FROM microsoft/windowsservercore
165 165
 # Use PowerShell as the default shell
166 166
 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
167 167
 
168
-ARG GO_VERSION=1.12.7
168
+ARG GO_VERSION=1.12.8
169 169
 
170 170
 # Environment variable notes:
171 171
 #  - GO_VERSION must be consistent with 'Dockerfile' used by Linux.
... ...
@@ -92,5 +92,5 @@ You can change a version of golang used for building stuff that is being tested
92 92
 by setting `GO_VERSION` variable, for example:
93 93
 
94 94
 ```
95
-make GO_VERSION=1.12.7 test
95
+make GO_VERSION=1.12.8 test
96 96
 ```
... ...
@@ -53,8 +53,8 @@ func TestParseHost(t *testing.T) {
53 53
 func TestParseDockerDaemonHost(t *testing.T) {
54 54
 	invalids := map[string]string{
55 55
 
56
-		"tcp:a.b.c.d":                   "Invalid bind address format: tcp:a.b.c.d",
57
-		"tcp:a.b.c.d/path":              "Invalid bind address format: tcp:a.b.c.d/path",
56
+		"tcp:a.b.c.d":                   "",
57
+		"tcp:a.b.c.d/path":              "",
58 58
 		"udp://127.0.0.1":               "Invalid bind address format: udp://127.0.0.1",
59 59
 		"udp://127.0.0.1:2375":          "Invalid bind address format: udp://127.0.0.1:2375",
60 60
 		"tcp://unix:///run/docker.sock": "Invalid proto, expected tcp: unix:///run/docker.sock",
... ...
@@ -83,7 +83,7 @@ func TestParseDockerDaemonHost(t *testing.T) {
83 83
 		"localhost:5555/path":         "tcp://localhost:5555/path",
84 84
 	}
85 85
 	for invalidAddr, expectedError := range invalids {
86
-		if addr, err := parseDaemonHost(invalidAddr); err == nil || err.Error() != expectedError {
86
+		if addr, err := parseDaemonHost(invalidAddr); err == nil || expectedError != "" && err.Error() != expectedError {
87 87
 			t.Errorf("tcp %v address expected error %q return, got %q and addr %v", invalidAddr, expectedError, err, addr)
88 88
 		}
89 89
 	}
... ...
@@ -99,8 +99,8 @@ func TestParseTCP(t *testing.T) {
99 99
 		defaultHTTPHost = "tcp://127.0.0.1:2376"
100 100
 	)
101 101
 	invalids := map[string]string{
102
-		"tcp:a.b.c.d":          "Invalid bind address format: tcp:a.b.c.d",
103
-		"tcp:a.b.c.d/path":     "Invalid bind address format: tcp:a.b.c.d/path",
102
+		"tcp:a.b.c.d":          "",
103
+		"tcp:a.b.c.d/path":     "",
104 104
 		"udp://127.0.0.1":      "Invalid proto, expected tcp: udp://127.0.0.1",
105 105
 		"udp://127.0.0.1:2375": "Invalid proto, expected tcp: udp://127.0.0.1:2375",
106 106
 	}
... ...
@@ -125,7 +125,7 @@ func TestParseTCP(t *testing.T) {
125 125
 		"localhost:5555/path":         "tcp://localhost:5555/path",
126 126
 	}
127 127
 	for invalidAddr, expectedError := range invalids {
128
-		if addr, err := ParseTCPAddr(invalidAddr, defaultHTTPHost); err == nil || err.Error() != expectedError {
128
+		if addr, err := ParseTCPAddr(invalidAddr, defaultHTTPHost); err == nil || expectedError != "" && err.Error() != expectedError {
129 129
 			t.Errorf("tcp %v address expected error %v return, got %s and addr %v", invalidAddr, expectedError, err, addr)
130 130
 		}
131 131
 	}