Skip to content

Commit 55ff66d

Browse files
committed
Extend version-align test with components
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent c8b9c21 commit 55ff66d

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

‎cli/command/system/testdata/docker-client-version.golden‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,39 @@ Client:
66
Built: Wed May 30 22:21:05 2018
77
OS/Arch: linux/amd64
88
Experimental: true
9+
10+
Server: Docker Enterprise Edition (EE) 2.0
11+
Engine:
12+
Version: 17.06.2-ee-15
13+
API version: 1.30 (minimum version 1.12)
14+
Go version: go1.8.7
15+
Git commit: 64ddfa6
16+
Built: Mon Jul 9 23:38:38 2018
17+
OS/Arch: linux/amd64
18+
Experimental: false
19+
Universal Control Plane:
20+
Version: 17.06.2-ee-15
21+
ApiVersion: 1.30
22+
Arch: amd64
23+
BuildTime: Mon Jul 2 21:24:07 UTC 2018
24+
GitCommit: 4513922
25+
GoVersion: go1.9.4
26+
MinApiVersion: 1.20
27+
Os: linux
28+
Version: 3.0.3-tp2
29+
Kubernetes:
30+
Version: 1.8+
31+
buildDate: 2018-04-26T16:51:21Z
32+
compiler: gc
33+
gitCommit: 8d637aedf46b9c21dde723e29c645b9f27106fa5
34+
gitTreeState: clean
35+
gitVersion: v1.8.11-docker-8d637ae
36+
goVersion: go1.8.3
37+
major: 1
38+
minor: 8+
39+
platform: linux/amd64
40+
Calico:
41+
Version: v3.0.8
42+
cni: v2.0.6
43+
kube-controllers: v2.0.5
44+
node: v3.0.8

‎cli/command/system/version_test.go‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,67 @@ func TestVersionAlign(t *testing.T) {
4343
BuildTime: "Wed May 30 22:21:05 2018",
4444
Experimental: true,
4545
},
46+
Server: &types.Version{},
4647
}
4748

49+
vi.Server.Platform.Name = "Docker Enterprise Edition (EE) 2.0"
50+
51+
vi.Server.Components = append(vi.Server.Components, types.ComponentVersion{
52+
Name: "Engine",
53+
Version: "17.06.2-ee-15",
54+
Details: map[string]string{
55+
"ApiVersion": "1.30",
56+
"MinAPIVersion": "1.12",
57+
"GitCommit": "64ddfa6",
58+
"GoVersion": "go1.8.7",
59+
"Os": "linux",
60+
"Arch": "amd64",
61+
"BuildTime": "Mon Jul 9 23:38:38 2018",
62+
"Experimental": "false",
63+
},
64+
})
65+
66+
vi.Server.Components = append(vi.Server.Components, types.ComponentVersion{
67+
Name: "Universal Control Plane",
68+
Version: "17.06.2-ee-15",
69+
Details: map[string]string{
70+
"Version": "3.0.3-tp2",
71+
"ApiVersion": "1.30",
72+
"Arch": "amd64",
73+
"BuildTime": "Mon Jul 2 21:24:07 UTC 2018",
74+
"GitCommit": "4513922",
75+
"GoVersion": "go1.9.4",
76+
"MinApiVersion": "1.20",
77+
"Os": "linux",
78+
},
79+
})
80+
81+
vi.Server.Components = append(vi.Server.Components, types.ComponentVersion{
82+
Name: "Kubernetes",
83+
Version: "1.8+",
84+
Details: map[string]string{
85+
"buildDate": "2018-04-26T16:51:21Z",
86+
"compiler": "gc",
87+
"gitCommit": "8d637aedf46b9c21dde723e29c645b9f27106fa5",
88+
"gitTreeState": "clean",
89+
"gitVersion": "v1.8.11-docker-8d637ae",
90+
"goVersion": "go1.8.3",
91+
"major": "1",
92+
"minor": "8+",
93+
"platform": "linux/amd64",
94+
},
95+
})
96+
97+
vi.Server.Components = append(vi.Server.Components, types.ComponentVersion{
98+
Name: "Calico",
99+
Version: "v3.0.8",
100+
Details: map[string]string{
101+
"cni": "v2.0.6",
102+
"kube-controllers": "v2.0.5",
103+
"node": "v3.0.8",
104+
},
105+
})
106+
48107
cli := test.NewFakeCli(&fakeClient{})
49108
tmpl, err := newVersionTemplate("")
50109
assert.NilError(t, err)

0 commit comments

Comments
 (0)