Skip to content

Commit 2f9dbe3

Browse files
Merge pull request #18692 from smarterclayton/fix_check
Automatic merge from submit-queue. The prometheus e2e isn't checking for its pods correctly
2 parents 7642cc8 + 40f26f3 commit 2f9dbe3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/extended/prometheus/prometheus.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
dto "github.com/prometheus/client_model/go"
1414
"github.com/prometheus/common/expfmt"
1515

16-
apps "k8s.io/api/apps/v1beta1"
1716
"k8s.io/api/core/v1"
1817
kapierrs "k8s.io/apimachinery/pkg/api/errors"
1918
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -318,7 +317,9 @@ func bringUpPrometheusFromTemplate(oc *exutil.CLI) (ns, host, bearerToken string
318317
fmt.Fprintf(g.GinkgoWriter, "test continuing, but create on the prometheus template resulted in: %#v", err)
319318
}
320319
tester := e2e.NewStatefulSetTester(oc.AdminKubeClient())
321-
tester.WaitForRunningAndReady(1, &apps.StatefulSet{ObjectMeta: metav1.ObjectMeta{Name: "prometheus", Namespace: "kube-system"}})
320+
ss, err := oc.AdminKubeClient().AppsV1beta1().StatefulSets("kube-system").Get("prometheus", metav1.GetOptions{})
321+
o.Expect(err).NotTo(o.HaveOccurred())
322+
tester.WaitForRunningAndReady(1, ss)
322323
}
323324

324325
waitForServiceAccountInNamespace(oc.AdminKubeClient(), "kube-system", "prometheus", 2*time.Minute)

0 commit comments

Comments
 (0)