ServerVersion retrieves and parses the server's version.
()
| 135 | |
| 136 | // ServerVersion retrieves and parses the server's version. |
| 137 | func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { |
| 138 | action := testing.ActionImpl{} |
| 139 | action.Verb = "get" |
| 140 | action.Resource = schema.GroupVersionResource{Resource: "version"} |
| 141 | c.Invokes(action, nil) |
| 142 | |
| 143 | if c.FakedServerVersion != nil { |
| 144 | return c.FakedServerVersion, nil |
| 145 | } |
| 146 | |
| 147 | versionInfo := kubeversion.Get() |
| 148 | return &versionInfo, nil |
| 149 | } |
| 150 | |
| 151 | // OpenAPISchema retrieves and parses the swagger API schema the server supports. |
| 152 | func (c *FakeDiscovery) OpenAPISchema() (*openapi_v2.Document, error) { |