Merge pull request #42724 from rhcs-dashboard/52082-cephadm-e2e-improv

mgr/dashboard: run-cephadm-e2e-tests.sh improvements
This commit is contained in:
Ernesto Puerta 2021-08-12 20:50:51 +02:00 committed by GitHub
commit 8fe3e260ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -48,6 +48,7 @@ https://raw.githubusercontent.com/ceph/ceph/master/SubmittingPatches.rst
- `jenkins test make check arm64`
- `jenkins test submodules`
- `jenkins test dashboard`
- `jenkins test dashboard cephadm`
- `jenkins test api`
- `jenkins test docs`
- `jenkins render docs`

View File

@ -13,11 +13,9 @@ get_vm_ip () {
echo -n $ip
}
if [[ -z "${CYPRESS_BASE_URL}" ]]; then
CEPH_NODE_00_IP="$(get_vm_ip ceph-node-00)"
if [[ -z "${CEPH_NODE_00_IP}" ]]; then
. "$(dirname $0)"/start-cluster.sh
fi
if [[ -n "${JENKINS_HOME}" || (-z "${CYPRESS_BASE_URL}" && -z "$(get_vm_ip ceph-node-00)") ]]; then
. "$(dirname $0)"/start-cluster.sh
CYPRESS_BASE_URL="https://$(get_vm_ip ceph-node-00):${DASHBOARD_PORT}"
fi
@ -27,11 +25,13 @@ cypress_run () {
local specs="$1"
local timeout="$2"
local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs}"
if [[ -n "$timeout" ]]; then
override_config="${override_config},defaultCommandTimeout=${timeout}"
fi
npx cypress run ${CYPRESS_ARGS} --browser chrome --headless --config "$override_config"
rm -f cypress/reports/results-*.xml || true
npx --no-install cypress run ${CYPRESS_ARGS} --browser chrome --headless --config "$override_config"
}
: ${CEPH_DEV_FOLDER:=${PWD}}