Add e2e tests for Grafana deployment
Signed-off-by: Arthur Sens <arthursens2005@gmail.com>
This commit is contained in:
committed by
GitHub
parent
44466ff434
commit
9e83b3cbd0
@@ -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."))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user