Skip to content

Commit 807db80

Browse files
authored
Merge pull request kubernetes#94969 from wojtek-t/list_all_namespaces_lease
Add test for listing Leases from all namespace
2 parents e92f8c8 + a65fec2 commit 807db80

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/e2e/common/lease.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,13 @@ var _ = framework.KubeDescribe("Lease", func() {
156156

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

0 commit comments

Comments
 (0)