MCPcopy Index your code
hub / github.com/docker/cli / TestVersionFormat

Function TestVersionFormat

cli/command/system/version_test.go:37–145  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestVersionFormat(t *testing.T) {
38 vi := versionInfo{
39 Client: clientVersion{
40 Version: "18.99.5-ce",
41 APIVersion: "1.38",
42 DefaultAPIVersion: "1.38",
43 GitCommit: "deadbeef",
44 GoVersion: "go1.10.2",
45 Os: "linux",
46 Arch: "amd64",
47 BuildTime: "Wed May 30 22:21:05 2018",
48 Context: "my-context",
49 },
50 Server: &serverVersion{
51 Platform: client.PlatformInfo{Name: "Docker Enterprise Edition (EE) 2.0"},
52 Version: "18.99.5-ce",
53 APIVersion: "1.30",
54 MinAPIVersion: "1.12",
55 Os: "linux",
56 Arch: "amd64",
57 GitCommit: "64ddfa6",
58 GoVersion: "go1.8.7",
59 KernelVersion: "v1.0.0",
60 Experimental: false,
61 BuildTime: "2018-07-09T22:38:38.000000000+00:00",
62 Components: []system.ComponentVersion{
63 {
64 Name: "Engine",
65 Version: "17.06.2-ee-15",
66 Details: map[string]string{
67 "ApiVersion": "1.30",
68 "MinAPIVersion": "1.12",
69 "GitCommit": "64ddfa6",
70 "GoVersion": "go1.8.7",
71 "Os": "linux",
72 "Arch": "amd64",
73 "BuildTime": "Mon Jul 9 23:38:38 2018",
74 "Experimental": "false",
75 },
76 },
77 {
78 Name: "Universal Control Plane",
79 Version: "17.06.2-ee-15",
80 Details: map[string]string{
81 "Version": "3.0.3-tp2",
82 "ApiVersion": "1.30",
83 "Arch": "amd64",
84 "BuildTime": "Mon Jul 2 21:24:07 UTC 2018",
85 "GitCommit": "4513922",
86 "GoVersion": "go1.9.4",
87 "MinApiVersion": "1.20",
88 "Os": "linux",
89 },
90 },
91 {
92 Name: "Kubernetes",
93 Version: "1.8+",
94 Details: map[string]string{

Callers

nothing calls this directly

Calls 4

newVersionTemplateFunction · 0.85
prettyPrintVersionFunction · 0.85
StringMethod · 0.65
NameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…