mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #84941 from robscott/kubectl-get-e2e-fix
Limiting the scope of new kubectl get e2e tests to decrease flakiness
This commit is contained in:
commit
1016b8b58a
@ -438,13 +438,9 @@ var _ = SIGDescribe("Kubectl client", func() {
|
|||||||
"BackendConfig": true,
|
"BackendConfig": true,
|
||||||
"NodeMetrics": true,
|
"NodeMetrics": true,
|
||||||
"PodMetrics": true,
|
"PodMetrics": true,
|
||||||
"ScalingPolicy": true,
|
|
||||||
"VolumeSnapshotClass": true,
|
"VolumeSnapshotClass": true,
|
||||||
"VolumeSnapshotContent": true,
|
"VolumeSnapshotContent": true,
|
||||||
"VolumeSnapshot": true,
|
"VolumeSnapshot": true,
|
||||||
|
|
||||||
// A CRD created by other e2e tests without any test data.
|
|
||||||
"Noxu": true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apiGroups, err := c.Discovery().ServerPreferredResources()
|
apiGroups, err := c.Discovery().ServerPreferredResources()
|
||||||
@ -453,6 +449,13 @@ var _ = SIGDescribe("Kubectl client", func() {
|
|||||||
testableResources := etcd.GetEtcdStorageDataForNamespace(f.Namespace.Name)
|
testableResources := etcd.GetEtcdStorageDataForNamespace(f.Namespace.Name)
|
||||||
|
|
||||||
for _, group := range apiGroups {
|
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 {
|
for _, resource := range group.APIResources {
|
||||||
if !verbsContain(resource.Verbs, "get") || ignoredResources[resource.Kind] || strings.HasPrefix(resource.Name, "e2e-test") {
|
if !verbsContain(resource.Verbs, "get") || ignoredResources[resource.Kind] || strings.HasPrefix(resource.Name, "e2e-test") {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user