mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add branch and build time to version
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
a7116c5e2b
commit
87eae0d659
6 changed files with 37 additions and 27 deletions
|
|
@ -15,23 +15,20 @@ func (s *DockerSuite) TestVersionEnsureSucceeds(c *check.C) {
|
|||
c.Fatalf("failed to execute docker version: %s, %v", out, err)
|
||||
}
|
||||
|
||||
stringsToCheck := []string{
|
||||
"Client version:",
|
||||
"Client API version:",
|
||||
"Go version (client):",
|
||||
"Git commit (client):",
|
||||
"OS/Arch (client):",
|
||||
"Server version:",
|
||||
"Server API version:",
|
||||
"Go version (server):",
|
||||
"Git commit (server):",
|
||||
"OS/Arch (server):",
|
||||
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 _, linePrefix := range stringsToCheck {
|
||||
if !strings.Contains(out, linePrefix) {
|
||||
c.Errorf("couldn't find string %v in output", linePrefix)
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue