mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
chore(validatingadmissionpolicystatus): use WaitForCacheSync after sharedInformerFactory Start in unit test
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
This commit is contained in:
parent
60c4c2b252
commit
18c0d6a79e
@ -114,6 +114,7 @@ func TestTypeChecking(t *testing.T) {
|
||||
t.Fatalf("cannot create controller: %v", err)
|
||||
}
|
||||
informerFactory.Start(ctx.Done())
|
||||
informerFactory.WaitForCacheSync(ctx.Done())
|
||||
go controller.Run(ctx, 1)
|
||||
err = wait.PollUntilContextCancel(ctx, time.Second, false, func(ctx context.Context) (done bool, err error) {
|
||||
name := policy.Name
|
||||
|
Loading…
Reference in New Issue
Block a user