Преглед на файлове

Fix TestAPIClientVersionOldNotSupported

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard преди 8 години
родител
ревизия
29d21388d5
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7 0
      integration-cli/docker_api_test.go

+ 7 - 0
integration-cli/docker_api_test.go

@@ -5,6 +5,7 @@ import (
 	"net/http"
 	"net/http/httptest"
 	"net/http/httputil"
+	"runtime"
 	"strconv"
 	"strings"
 	"time"
@@ -64,6 +65,12 @@ func (s *DockerSuite) TestAPIClientVersionNewerThanServer(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, ".")
 	vMinInt, err := strconv.Atoi(v[1])
 	c.Assert(err, checker.IsNil)