mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Merge pull request #126594 from omerap12/informet-validatingadmissionpolicystatus
chore(validatingadmissionpolicystatus): use WaitForCacheSync after sharedInformerFactory Start in unit test
This commit is contained in:
@@ -114,6 +114,7 @@ func TestTypeChecking(t *testing.T) {
|
|||||||
t.Fatalf("cannot create controller: %v", err)
|
t.Fatalf("cannot create controller: %v", err)
|
||||||
}
|
}
|
||||||
informerFactory.Start(ctx.Done())
|
informerFactory.Start(ctx.Done())
|
||||||
|
informerFactory.WaitForCacheSync(ctx.Done())
|
||||||
go controller.Run(ctx, 1)
|
go controller.Run(ctx, 1)
|
||||||
err = wait.PollUntilContextCancel(ctx, time.Second, false, func(ctx context.Context) (done bool, err error) {
|
err = wait.PollUntilContextCancel(ctx, time.Second, false, func(ctx context.Context) (done bool, err error) {
|
||||||
name := policy.Name
|
name := policy.Name
|
||||||
|
Reference in New Issue
Block a user