Merge pull request #94969 from wojtek-t/list_all_namespaces_lease

Add test for listing Leases from all namespace
This commit is contained in:
Kubernetes Prow Robot 2020-09-24 13:57:39 -07:00 committed by GitHub
commit 807db805c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,5 +156,13 @@ var _ = framework.KubeDescribe("Lease", func() {
_, err = leaseClient.Get(context.TODO(), name, metav1.GetOptions{})
framework.ExpectEqual(apierrors.IsNotFound(err), true)
leaseClient = f.ClientSet.CoordinationV1().Leases(metav1.NamespaceAll)
// Number of leases may be high in large clusters, as Lease object is
// created for every node by the corresponding Kubelet.
// That said, the objects themselves are small (~300B), so even with 5000
// of them, that gives ~1.5MB, which is acceptable.
_, err = leaseClient.List(context.TODO(), metav1.ListOptions{})
framework.ExpectNoError(err, "couldn't list Leases from all namespace")
})
})