Skip to content

Commit 4f39dfe

Browse files
committed
Wrap catalog update test with retry logic
1 parent 44fc44d commit 4f39dfe

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/e2e/catalog_e2e_test.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -1068,8 +1068,14 @@ var _ = Describe("Catalog represents a store of bundles which OLM can use to ins
10681068

10691069
source.SetAnnotations(map[string]string{catalogsource.CatalogImageTemplateAnnotation: fmt.Sprintf("quay.io/olmtest/catsrc-update-test:%s.%s.%s", catalogsource.TemplKubeMajorV, catalogsource.TemplKubeMinorV, catalogsource.TemplKubePatchV)})
10701070

1071-
source, err = crc.OperatorsV1alpha1().CatalogSources(source.GetNamespace()).Update(context.TODO(), source, metav1.UpdateOptions{})
1072-
Expect(err).ShouldNot(HaveOccurred(), "error updating catalog source with template annotation")
1071+
// Update the catalog image
1072+
Eventually(func() (bool, error) {
1073+
source, err = crc.OperatorsV1alpha1().CatalogSources(source.GetNamespace()).Update(context.TODO(), source, metav1.UpdateOptions{})
1074+
if err == nil {
1075+
return true, nil
1076+
}
1077+
return false, nil
1078+
}).Should(BeTrue())
10731079

10741080
// wait for status condition to show up
10751081
Eventually(func() (bool, error) {

0 commit comments

Comments
 (0)