Skip to content

Commit

Permalink
account for already exist race with prometheus ext tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabemontero committed Dec 14, 2017
1 parent d3cdfec commit 9b9f68d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/extended/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ func bringUpPrometheusFromTemplate(oc *exutil.CLI) (ns, host, bearerToken string
stdout, _, err := oc.WithoutNamespace().Run("process").Args("-f", configPath).Outputs()
o.Expect(err).NotTo(o.HaveOccurred())
err = oc.WithoutNamespace().AsAdmin().Run("create").Args("-f", "-").InputString(stdout).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
// rather than parse the oc err output from valid situations like the object already exist, just logging
// the error and continue ... if something else is up, it will be caught later down the line
if err != nil {
fmt.Fprintf(g.GinkgoWriter, "test continuing, but create on the prometheus template resulted in: %#v", err)
}
e2e.WaitForDeploymentComplete(oc.AdminKubeClient(), &extensions.Deployment{ObjectMeta: metav1.ObjectMeta{Name: "prometheus", Namespace: "kube-system"}})
}

Expand Down

0 comments on commit 9b9f68d

Please sign in to comment.