Skip to content
Snippets Groups Projects
Commit 9e83b3cb authored by Arthur Silva Sens's avatar Arthur Silva Sens Committed by GitHub
Browse files

Add e2e tests for Grafana deployment

parent 44466ff4
Branches
Tags
No related merge requests found
...@@ -277,3 +277,18 @@ func TestFailedRuleEvaluations(t *testing.T) { ...@@ -277,3 +277,18 @@ func TestFailedRuleEvaluations(t *testing.T) {
t.Fatal(err) 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment