diff --git a/tests/e2e/main_test.go b/tests/e2e/main_test.go index 86cbfb58ef186736aef9b2be77312868ced4c53e..a38b4a3f0d48df5bbc7a78d632e25bc3add45e15 100644 --- a/tests/e2e/main_test.go +++ b/tests/e2e/main_test.go @@ -277,3 +277,18 @@ func TestFailedRuleEvaluations(t *testing.T) { t.Fatal(err) } } + +func TestGrafana(t *testing.T){ + kClient := promClient.kubeClient + + err := wait.Poll(30*time.Second, 5*time.Minute, func() (bool, error) { + grafanaDeployment, err := kClient.AppsV1().Deployments("monitoring").Get(context.Background(), "grafana", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + return grafanaDeployment.Status.ReadyReplicas == *grafanaDeployment.Spec.Replicas, nil + }) + if err != nil { + t.Fatal(errors.Wrap(err, "Timeout while waiting for deployment ready condition.")) + } +} \ No newline at end of file