Skip to content

Commit 9b9f68d

Browse files
committed
account for already exist race with prometheus ext tests
1 parent d3cdfec commit 9b9f68d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/extended/prometheus/prometheus.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ func bringUpPrometheusFromTemplate(oc *exutil.CLI) (ns, host, bearerToken string
310310
stdout, _, err := oc.WithoutNamespace().Run("process").Args("-f", configPath).Outputs()
311311
o.Expect(err).NotTo(o.HaveOccurred())
312312
err = oc.WithoutNamespace().AsAdmin().Run("create").Args("-f", "-").InputString(stdout).Execute()
313-
o.Expect(err).NotTo(o.HaveOccurred())
313+
// rather than parse the oc err output from valid situations like the object already exist, just logging
314+
// the error and continue ... if something else is up, it will be caught later down the line
315+
if err != nil {
316+
fmt.Fprintf(g.GinkgoWriter, "test continuing, but create on the prometheus template resulted in: %#v", err)
317+
}
314318
e2e.WaitForDeploymentComplete(oc.AdminKubeClient(), &extensions.Deployment{ObjectMeta: metav1.ObjectMeta{Name: "prometheus", Namespace: "kube-system"}})
315319
}
316320

0 commit comments

Comments
 (0)