Wire contexts to Core controllers
This commit is contained in:
@@ -141,10 +141,10 @@ func TestTTLAnnotations(t *testing.T) {
|
||||
nodeInformer := informers.Core().V1().Nodes()
|
||||
ttlc := ttl.NewTTLController(nodeInformer, testClient)
|
||||
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
go nodeInformer.Informer().Run(stopCh)
|
||||
go ttlc.Run(1, stopCh)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
go nodeInformer.Informer().Run(ctx.Done())
|
||||
go ttlc.Run(ctx, 1)
|
||||
|
||||
// Create 100 nodes all should have annotation equal to 0.
|
||||
createNodes(t, testClient, 0, 100)
|
||||
|
Reference in New Issue
Block a user