mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #18779 from aditirajagopal/18750-new-string-method
pkg/version.Version: use the new String() method
This commit is contained in:
commit
7ff61dd592
2 changed files with 3 additions and 3 deletions
|
@ -104,7 +104,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
|
|||
}
|
||||
customHeaders["User-Agent"] = "Docker-Client/" + dockerversion.Version + " (" + runtime.GOOS + ")"
|
||||
|
||||
verStr := string(api.DefaultVersion)
|
||||
verStr := api.DefaultVersion.String()
|
||||
if tmpStr := os.Getenv("DOCKER_API_VERSION"); tmpStr != "" {
|
||||
verStr = tmpStr
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ func (s *DockerSuite) TestApiVersionStatusCode(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestApiClientVersionNewerThanServer(c *check.C) {
|
||||
v := strings.Split(string(api.DefaultVersion), ".")
|
||||
v := strings.Split(api.DefaultVersion.String(), ".")
|
||||
vMinInt, err := strconv.Atoi(v[1])
|
||||
c.Assert(err, checker.IsNil)
|
||||
vMinInt++
|
||||
|
@ -63,7 +63,7 @@ func (s *DockerSuite) TestApiClientVersionNewerThanServer(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestApiClientVersionOldNotSupported(c *check.C) {
|
||||
v := strings.Split(string(api.MinVersion), ".")
|
||||
v := strings.Split(api.MinVersion.String(), ".")
|
||||
vMinInt, err := strconv.Atoi(v[1])
|
||||
c.Assert(err, checker.IsNil)
|
||||
vMinInt--
|
||||
|
|
Loading…
Reference in a new issue