Merge pull request #1390 from ArthurSens/as/grafana-e2e-test
Add e2e tests for Grafana deployment
This commit is contained in:
@@ -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."))
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user