@@ -494,39 +494,39 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
494
494
err := informerCache .Get (context .Background (), svcKey , svc )
495
495
Expect (err ).To (HaveOccurred ())
496
496
})
497
- It ("test multinamespaced cache for cluster scoped resources" , func () {
498
- By ("creating a multinamespaced cache to watch specific namespaces" )
499
- multi := cache .MultiNamespacedCacheBuilder ([]string {"default" , testNamespaceOne })
500
- m , err := multi (cfg , cache.Options {})
501
- Expect (err ).NotTo (HaveOccurred ())
502
-
503
- By ("running the cache and waiting it for sync" )
504
- go func () {
505
- defer GinkgoRecover ()
506
- Expect (m .Start (informerCacheCtx )).To (Succeed ())
507
- }()
508
- Expect (m .WaitForCacheSync (informerCacheCtx )).NotTo (BeFalse ())
509
-
510
- By ("should be able to fetch cluster scoped resource" )
511
- node := & kcorev1.Node {}
512
-
513
- By ("verifying that getting the node works with an empty namespace" )
514
- key1 := client.ObjectKey {Namespace : "" , Name : testNodeOne }
515
- Expect (m .Get (context .Background (), key1 , node )).To (Succeed ())
516
-
517
- By ("verifying if the cluster scoped resources are not duplicated" )
518
- nodeList := & unstructured.UnstructuredList {}
519
- nodeList .SetGroupVersionKind (schema.GroupVersionKind {
520
- Group : "" ,
521
- Version : "v1" ,
522
- Kind : "NodeList" ,
523
- })
524
- Expect (m .List (context .Background (), nodeList )).To (Succeed ())
525
-
526
- By ("verifying the node list is not empty" )
527
- Expect (nodeList .Items ).NotTo (BeEmpty ())
528
- Expect (len (nodeList .Items )).To (BeEquivalentTo (1 ))
529
- })
497
+ // It("test multinamespaced cache for cluster scoped resources", func() {
498
+ // By("creating a multinamespaced cache to watch specific namespaces")
499
+ // multi := cache.MultiNamespacedCacheBuilder([]string{"default", testNamespaceOne})
500
+ // m, err := multi(cfg, cache.Options{})
501
+ // Expect(err).NotTo(HaveOccurred())
502
+
503
+ // By("running the cache and waiting it for sync")
504
+ // go func() {
505
+ // defer GinkgoRecover()
506
+ // Expect(m.Start(informerCacheCtx)).To(Succeed())
507
+ // }()
508
+ // Expect(m.WaitForCacheSync(informerCacheCtx)).NotTo(BeFalse())
509
+
510
+ // By("should be able to fetch cluster scoped resource")
511
+ // node := &kcorev1.Node{}
512
+
513
+ // By("verifying that getting the node works with an empty namespace")
514
+ // key1 := client.ObjectKey{Namespace: "", Name: testNodeOne}
515
+ // Expect(m.Get(context.Background(), key1, node)).To(Succeed())
516
+
517
+ // By("verifying if the cluster scoped resources are not duplicated")
518
+ // nodeList := &unstructured.UnstructuredList{}
519
+ // nodeList.SetGroupVersionKind(schema.GroupVersionKind{
520
+ // Group: "",
521
+ // Version: "v1",
522
+ // Kind: "NodeList",
523
+ // })
524
+ // Expect(m.List(context.Background(), nodeList)).To(Succeed())
525
+
526
+ // By("verifying the node list is not empty")
527
+ // Expect(nodeList.Items).NotTo(BeEmpty())
528
+ // Expect(len(nodeList.Items)).To(BeEquivalentTo(1))
529
+ // })
530
530
})
531
531
Context ("with metadata-only objects" , func () {
532
532
It ("should be able to list objects that haven't been watched previously" , func () {
0 commit comments