mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
update docker_cli_version_test.go
fix spelling mistake again Signed-off-by: Mageee <fangpuyi@foxmail.com>
This commit is contained in:
parent
6733962a2c
commit
d4d0718ebf
1 changed files with 4 additions and 9 deletions
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/docker/docker/pkg/integration/checker"
|
||||||
"github.com/go-check/check"
|
"github.com/go-check/check"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,9 +22,7 @@ func (s *DockerSuite) TestVersionEnsureSucceeds(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v := range stringsToCheck {
|
for k, v := range stringsToCheck {
|
||||||
if strings.Count(out, k) != v {
|
c.Assert(strings.Count(out, k), checker.Equals, v, check.Commentf("The count of %v in %s does not match excepted", k, out))
|
||||||
c.Errorf("%v expected %d instances found %d", k, v, strings.Count(out, k))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,9 +43,7 @@ func testVersionPlatform(c *check.C, platform string) {
|
||||||
expected := "OS/Arch: " + platform
|
expected := "OS/Arch: " + platform
|
||||||
|
|
||||||
split := strings.Split(out, "\n")
|
split := strings.Split(out, "\n")
|
||||||
if len(split) < 14 { // To avoid invalid indexing in loop below
|
c.Assert(len(split) >= 14, checker.Equals, true, check.Commentf("got %d lines from version", len(split)))
|
||||||
c.Errorf("got %d lines from version", len(split))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify the second 'OS/Arch' matches the platform. Experimental has
|
// Verify the second 'OS/Arch' matches the platform. Experimental has
|
||||||
// more lines of output than 'regular'
|
// more lines of output than 'regular'
|
||||||
|
@ -57,7 +54,5 @@ func testVersionPlatform(c *check.C, platform string) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !bFound {
|
c.Assert(bFound, checker.Equals, true, check.Commentf("Could not find server '%s' in '%s'", expected, out))
|
||||||
c.Errorf("Could not find server '%s' in '%s'", expected, out)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue