published by bot

(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is d8c925319a23f6bbf865baa53ae23f48f60dd73b
This commit is contained in:
Kubernetes Publisher
2016-12-11 15:19:40 +00:00
parent 6841809cf1
commit 243d8a9cb6
165 changed files with 28504 additions and 27192 deletions

View File

@@ -45,7 +45,7 @@ type Fake struct {
// for every request in the order they are tried.
ProxyReactionChain []ProxyReactor
Resources map[string]*metav1.APIResourceList
Resources []*metav1.APIResourceList
}
// Reactor is an interface to allow the composition of reaction functions.
@@ -225,10 +225,16 @@ func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*me
Resource: schema.GroupVersionResource{Resource: "resource"},
}
c.Invokes(action, nil)
return c.Resources[groupVersion], nil
for _, rl := range c.Resources {
if rl.GroupVersion == groupVersion {
return rl, nil
}
}
return nil, fmt.Errorf("GroupVersion %q not found", groupVersion)
}
func (c *FakeDiscovery) ServerResources() (map[string]*metav1.APIResourceList, error) {
func (c *FakeDiscovery) ServerResources() ([]*metav1.APIResourceList, error) {
action := ActionImpl{
Verb: "get",
Resource: schema.GroupVersionResource{Resource: "resource"},