Skip to content

Commit

Permalink
Wrap catalog update test with retry logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrizza committed Aug 2, 2021
1 parent 44fc44d commit 4f39dfe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/e2e/catalog_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,8 +1068,14 @@ var _ = Describe("Catalog represents a store of bundles which OLM can use to ins

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

source, err = crc.OperatorsV1alpha1().CatalogSources(source.GetNamespace()).Update(context.TODO(), source, metav1.UpdateOptions{})
Expect(err).ShouldNot(HaveOccurred(), "error updating catalog source with template annotation")
// Update the catalog image
Eventually(func() (bool, error) {
source, err = crc.OperatorsV1alpha1().CatalogSources(source.GetNamespace()).Update(context.TODO(), source, metav1.UpdateOptions{})
if err == nil {
return true, nil
}
return false, nil
}).Should(BeTrue())

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

0 comments on commit 4f39dfe

Please sign in to comment.