mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Add new watchers to PV controller tests
Add fake Pod and Node watchers to the tests. It only reduces test noise:
Failed to watch *v1.Pod: unhandled watch: testing.WatchActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"watch", Resource:schema.GroupVersionResource{Group:"", Version:"v1", Resource:"pods"}, Subresource:""}, WatchRestrictions:testing.WatchRestrictions{Labels:labels.internalSelector(nil), Fields:fields.andTerm{}, ResourceVersion:""}}
			
			
This commit is contained in:
		@@ -324,6 +324,8 @@ func TestControllerSync(t *testing.T) {
 | 
				
			|||||||
		fakeClaimWatch := watch.NewFake()
 | 
							fakeClaimWatch := watch.NewFake()
 | 
				
			||||||
		client.PrependWatchReactor("persistentvolumeclaims", core.DefaultWatchReactor(fakeClaimWatch, nil))
 | 
							client.PrependWatchReactor("persistentvolumeclaims", core.DefaultWatchReactor(fakeClaimWatch, nil))
 | 
				
			||||||
		client.PrependWatchReactor("storageclasses", core.DefaultWatchReactor(watch.NewFake(), nil))
 | 
							client.PrependWatchReactor("storageclasses", core.DefaultWatchReactor(watch.NewFake(), nil))
 | 
				
			||||||
 | 
							client.PrependWatchReactor("nodes", core.DefaultWatchReactor(watch.NewFake(), nil))
 | 
				
			||||||
 | 
							client.PrependWatchReactor("pods", core.DefaultWatchReactor(watch.NewFake(), nil))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		informers := informers.NewSharedInformerFactory(client, controller.NoResyncPeriodFunc())
 | 
							informers := informers.NewSharedInformerFactory(client, controller.NoResyncPeriodFunc())
 | 
				
			||||||
		ctrl, err := newTestController(client, informers, true)
 | 
							ctrl, err := newTestController(client, informers, true)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user