Skip to content

Commit

Permalink
Merge pull request kubernetes#84941 from robscott/kubectl-get-e2e-fix
Browse files Browse the repository at this point in the history
Limiting the scope of new kubectl get e2e tests to decrease flakiness
  • Loading branch information
k8s-ci-robot authored Nov 8, 2019
2 parents 1772446 + 1ae53a1 commit 1016b8b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/e2e/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,9 @@ var _ = SIGDescribe("Kubectl client", func() {
"BackendConfig": true,
"NodeMetrics": true,
"PodMetrics": true,
"ScalingPolicy": true,
"VolumeSnapshotClass": true,
"VolumeSnapshotContent": true,
"VolumeSnapshot": true,

// A CRD created by other e2e tests without any test data.
"Noxu": true,
}

apiGroups, err := c.Discovery().ServerPreferredResources()
Expand All @@ -453,6 +449,13 @@ var _ = SIGDescribe("Kubectl client", func() {
testableResources := etcd.GetEtcdStorageDataForNamespace(f.Namespace.Name)

for _, group := range apiGroups {
// This limits the scope of this test to exclude CRDs. This
// assumes that CRDs will not have a .k8s.io group and will have
// a . in their name.
if !strings.Contains(group.GroupVersion, ".k8s.io") && strings.Contains(group.GroupVersion, ".") {
continue
}

for _, resource := range group.APIResources {
if !verbsContain(resource.Verbs, "get") || ignoredResources[resource.Kind] || strings.HasPrefix(resource.Name, "e2e-test") {
continue
Expand Down

0 comments on commit 1016b8b

Please sign in to comment.