mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Add: test for finding service from listing all namespaces
This commit is contained in:
parent
862c8bf818
commit
c53006b1a2
@ -2634,6 +2634,21 @@ var _ = SIGDescribe("Services", func() {
|
||||
framework.ExpectNoError(err)
|
||||
e2eservice.WaitForServiceUpdatedWithFinalizer(cs, svc.Namespace, svc.Name, true)
|
||||
})
|
||||
|
||||
ginkgo.It("should find a service from listing all namespaces", func() {
|
||||
ginkgo.By("fetching services")
|
||||
svcs, _ := f.ClientSet.CoreV1().Services("").List(metav1.ListOptions{})
|
||||
|
||||
foundSvc := false
|
||||
for _, svc := range svcs.Items {
|
||||
if svc.ObjectMeta.Name == "kubernetes" && svc.ObjectMeta.Namespace == "default" {
|
||||
foundSvc = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
framework.ExpectEqual(foundSvc, true, "could not find service 'kubernetes' in service list in all namespaces")
|
||||
})
|
||||
})
|
||||
|
||||
// TODO: Get rid of [DisabledForLargeClusters] tag when issue #56138 is fixed.
|
||||
|
Loading…
Reference in New Issue
Block a user