1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 10:04:25 +00:00

e2e test - add retry when getting generated configmap

Signed-off-by: ShutingZhao <shutting06@gmail.com>
This commit is contained in:
ShutingZhao 2021-10-06 22:36:43 -07:00
parent 6dbb529267
commit a5c399bb15

View file

@ -1102,8 +1102,15 @@ func Test_Generate_Policy_Deletion_for_Clone(t *testing.T) {
// ======= Check Generated Resources =======
By(fmt.Sprintf("Checking the generated resource (Configmap) in namespace : %s", tests.ResourceNamespace))
_, err = e2eClient.GetNamespacedResource(cmGVR, tests.ResourceNamespace, tests.ConfigMapName)
err = e2e.GetWithRetry(1*time.Second, 15, func() error {
_, err := e2eClient.GetNamespacedResource(cmGVR, tests.ResourceNamespace, tests.ConfigMapName)
if err != nil {
return err
}
return nil
})
Expect(err).NotTo(HaveOccurred())
// ===========================================
// test: the generated resource is not updated if the source resource is updated