5 : ${CYPRESS_BASE_URL:=''}
6 : ${CYPRESS_LOGIN_USER:='admin'}
7 : ${CYPRESS_LOGIN_PWD:='password'}
9 : ${DASHBOARD_PORT:='8443'}
12 local ip
=$
(kcli info vm
"$1" -f ip
-v |
grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
16 if [[ -n "${JENKINS_HOME}" ||
(-z "${CYPRESS_BASE_URL}" && -z "$(get_vm_ip ceph-node-00)") ]]; then
17 .
"$(dirname $0)"/start-cluster.sh
19 CYPRESS_BASE_URL
="https://$(get_vm_ip ceph-node-00):${DASHBOARD_PORT}"
22 export CYPRESS_BASE_URL CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD
27 local override_config
="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs},chromeWebSecurity=false"
28 if [[ -n "$timeout" ]]; then
29 override_config
="${override_config},defaultCommandTimeout=${timeout}"
32 rm -f cypress
/reports
/results-
*.xml || true
34 npx
--no-install cypress run
${CYPRESS_ARGS} --browser chrome
--headless --config "$override_config"
37 : ${CEPH_DEV_FOLDER:=${PWD}}
39 cd ${CEPH_DEV_FOLDER}/src
/pybind
/mgr
/dashboard
/frontend
41 # check if the prometheus daemon is running
42 # before starting the e2e tests
44 PROMETHEUS_RUNNING_COUNT
=$
(kcli
ssh -u root ceph-node-00
'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq
-r '.[] | .status.running')
45 while [[ $PROMETHEUS_RUNNING_COUNT -lt 1 ]]; do
46 PROMETHEUS_RUNNING_COUNT
=$
(kcli
ssh -u root ceph-node-00
'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq
-r '.[] | .status.running')
49 cypress_run
["orchestrator/workflow/*.feature, orchestrator/workflow/*-spec.ts"]
50 cypress_run
"orchestrator/grafana/*.feature"