]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/ci/cephadm/run-cephadm-e2e-tests.sh
import ceph quincy 17.2.6
[ceph.git] / ceph / src / pybind / mgr / dashboard / ci / cephadm / run-cephadm-e2e-tests.sh
index e109297160892ce84a465bcba854e71775db967d..4b6ad4dbe88b7c8b993bca30b82b65488c3e0ba7 100755 (executable)
@@ -24,7 +24,7 @@ export CYPRESS_BASE_URL CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD
 cypress_run () {
     local specs="$1"
     local timeout="$2"
-    local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs}"
+    local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs},chromeWebSecurity=false"
     if [[ -n "$timeout" ]]; then
         override_config="${override_config},defaultCommandTimeout=${timeout}"
     fi
@@ -38,4 +38,20 @@ cypress_run () {
 
 cd ${CEPH_DEV_FOLDER}/src/pybind/mgr/dashboard/frontend
 
-cypress_run "orchestrator/workflow/*-spec.ts"
+# check if the prometheus daemon is running
+# before starting the e2e tests
+
+PROMETHEUS_RUNNING_COUNT=$(kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq -r '.[] | .status.running')
+while [[ $PROMETHEUS_RUNNING_COUNT -lt 1 ]]; do
+    PROMETHEUS_RUNNING_COUNT=$(kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq -r '.[] | .status.running')
+done
+
+# grafana ip address is set to the fqdn by default.
+# kcli is not working with that, so setting the IP manually.
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-alertmanager-api-host http://192.168.100.100:9093"'
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-prometheus-api-host http://192.168.100.100:9095"'
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-grafana-api-url https://192.168.100.100:3000"'
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch apply node-exporter --placement 'count:2'"'
+
+cypress_run ["orchestrator/workflow/*.feature, orchestrator/workflow/*-spec.ts"]
+cypress_run "orchestrator/grafana/*.feature"