Merge pull request #63624 from liggitt/discovery-cleanup

Automatic merge from submit-queue (batch tested with PRs 63624, 59847). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

continued discovery cleanup, aggregator e2e test deflaking

deflakes one set of failures seen in https://github.com/kubernetes/kubernetes/issues/63622 in which the aggregator test fails because of an unrelated simultaneous CRD change made by another test

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-05-09 17:55:09 -07:00 committed by GitHub
commit 508510d536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,14 +382,13 @@ func TestSampleAPIServer(f *framework.Framework, image string) {
flunderName = generateFlunderName("dynamic-flunder")
// Rerun the Create/List/Delete tests using the Dynamic client.
resources, err := client.Discovery().ServerPreferredNamespacedResources()
framework.ExpectNoError(err, "getting server preferred namespaces resources for dynamic client")
resources, discoveryErr := client.Discovery().ServerPreferredNamespacedResources()
groupVersionResources, err := discovery.GroupVersionResources(resources)
framework.ExpectNoError(err, "getting group version resources for dynamic client")
gvr := schema.GroupVersionResource{Group: "wardle.k8s.io", Version: "v1alpha1", Resource: "flunders"}
_, ok := groupVersionResources[gvr]
if !ok {
framework.Failf("could not find group version resource for dynamic client and wardle/flunders.")
framework.Failf("could not find group version resource for dynamic client and wardle/flunders (discovery error: %v, discovery results: %#v)", discoveryErr, groupVersionResources)
}
dynamicClient := f.DynamicClient.Resource(gvr).Namespace(namespace)