1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix TestAPIClientVersionOldNotSupported

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2016-11-02 09:43:29 -07:00
parent 78a83a2269
commit 29d21388d5

View file

@ -5,6 +5,7 @@ import (
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"net/http/httputil" "net/http/httputil"
"runtime"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@ -64,6 +65,12 @@ func (s *DockerSuite) TestAPIClientVersionNewerThanServer(c *check.C) {
} }
func (s *DockerSuite) TestAPIClientVersionOldNotSupported(c *check.C) { func (s *DockerSuite) TestAPIClientVersionOldNotSupported(c *check.C) {
if daemonPlatform != runtime.GOOS {
c.Skip("Daemon platform doesn't match test platform")
}
if api.MinVersion == api.DefaultVersion {
c.Skip("API MinVersion==DefaultVersion")
}
v := strings.Split(api.MinVersion, ".") v := strings.Split(api.MinVersion, ".")
vMinInt, err := strconv.Atoi(v[1]) vMinInt, err := strconv.Atoi(v[1])
c.Assert(err, checker.IsNil) c.Assert(err, checker.IsNil)