Skip to content

Commit 1016b8b

Browse files
authored
Merge pull request kubernetes#84941 from robscott/kubectl-get-e2e-fix
Limiting the scope of new kubectl get e2e tests to decrease flakiness
2 parents 1772446 + 1ae53a1 commit 1016b8b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/e2e/kubectl/kubectl.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,9 @@ var _ = SIGDescribe("Kubectl client", func() {
438438
"BackendConfig": true,
439439
"NodeMetrics": true,
440440
"PodMetrics": true,
441-
"ScalingPolicy": true,
442441
"VolumeSnapshotClass": true,
443442
"VolumeSnapshotContent": true,
444443
"VolumeSnapshot": true,
445-
446-
// A CRD created by other e2e tests without any test data.
447-
"Noxu": true,
448444
}
449445

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

455451
for _, group := range apiGroups {
452+
// This limits the scope of this test to exclude CRDs. This
453+
// assumes that CRDs will not have a .k8s.io group and will have
454+
// a . in their name.
455+
if !strings.Contains(group.GroupVersion, ".k8s.io") && strings.Contains(group.GroupVersion, ".") {
456+
continue
457+
}
458+
456459
for _, resource := range group.APIResources {
457460
if !verbsContain(resource.Verbs, "get") || ignoredResources[resource.Kind] || strings.HasPrefix(resource.Name, "e2e-test") {
458461
continue

0 commit comments

Comments
 (0)