mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
eef6eda7d2
Part of #14603 integration-cli/docker_cli_links_test.go (coolljt0725) integration-cli/docker_cli_links_unix_test.go (coolljt0725) integration-cli/docker_cli_logs_test.go (coolljt0725) integration-cli/docker_cli_nat_test.go (coolljt0725) integration-cli/docker_cli_network_test.go (coolljt0725) integration-cli/docker_cli_stats_test.go (coolljt0725) integration-cli/docker_cli_tag_test.go (coolljt0725) integration-cli/docker_cli_top_test.go (coolljt0725) integration-cli/docker_cli_version_test.go (coolljt0725) integration-cli/docker_cli_wait_test.go (coolljt0725 Signed-off-by: Lei Jitang <leijitang@huawei.com>
28 lines
567 B
Go
28 lines
567 B
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/go-check/check"
|
|
)
|
|
|
|
// ensure docker version works
|
|
func (s *DockerSuite) TestVersionEnsureSucceeds(c *check.C) {
|
|
out, _ := dockerCmd(c, "version")
|
|
stringsToCheck := map[string]int{
|
|
"Client:": 1,
|
|
"Server:": 1,
|
|
" Version:": 2,
|
|
" API version:": 2,
|
|
" Go version:": 2,
|
|
" Git commit:": 2,
|
|
" OS/Arch:": 2,
|
|
" Built:": 2,
|
|
}
|
|
|
|
for k, v := range stringsToCheck {
|
|
if strings.Count(out, k) != v {
|
|
c.Errorf("%v expected %d instances found %d", k, v, strings.Count(out, k))
|
|
}
|
|
}
|
|
}
|