From: alfonsomthd Date: Wed, 30 Jan 2019 12:05:02 +0000 (+0100) Subject: mgr/dashboard: fix skipped backend API tests X-Git-Tag: v14.1.0~249^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c094e2d70259d0a642770ed7cbc15bd48825e304;p=ceph-ci.git mgr/dashboard: fix skipped backend API tests * When the creation of the cluster is delegated to vstart_runner.py (--create or --create-target-only) the amount of MGRs required is calculated by the script so there is no more skipped tests due to insufficient amount of MGRs. * Additionally, this issue is not reproducible anymore: Fixes: https://tracker.ceph.com/issues/37964 * Fixed typo: TEUTHOLOFY_PY_REQS Signed-off-by: Alfonso Martínez --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index e0d80501099..260e9907cb2 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -23,6 +23,11 @@ Alternative usage: # If you wish to run a named test case, pass it as an argument: python ~/git/ceph/qa/tasks/vstart_runner.py tasks.cephfs.test_data_scan + # Also, you can create the cluster once and then run named test cases against it: + python ~/git/ceph/qa/tasks/vstart_runner.py --create-cluster-only + python ~/git/ceph/qa/tasks/vstart_runner.py tasks.mgr.dashboard.test_health + python ~/git/ceph/qa/tasks/vstart_runner.py tasks.mgr.dashboard.test_rgw + """ from StringIO import StringIO @@ -878,6 +883,7 @@ def exec_test(): # Parse arguments interactive_on_error = False create_cluster = False + create_cluster_only = False args = sys.argv[1:] flags = [a for a in args if a.startswith("-")] @@ -887,6 +893,8 @@ def exec_test(): interactive_on_error = True elif f == "--create": create_cluster = True + elif f == "--create-cluster-only": + create_cluster_only = True else: log.error("Unknown option '{0}'".format(f)) sys.exit(-1) @@ -917,7 +925,7 @@ def exec_test(): os.kill(pid, signal.SIGKILL) # Fire up the Ceph cluster if the user requested it - if create_cluster: + if create_cluster or create_cluster_only: log.info("Creating cluster with {0} MDS daemons".format( max_required_mds)) remote.run([os.path.join(SRC_PREFIX, "stop.sh")], check_status=False) @@ -940,6 +948,9 @@ def exec_test(): # definitely succeed LocalCephCluster(LocalContext()).mon_manager.wait_for_all_osds_up(timeout=30) + if create_cluster_only: + return + # List of client mounts, sufficient to run the selected tests clients = [i.__str__() for i in range(0, max_required_clients)] diff --git a/src/pybind/mgr/dashboard/run-backend-api-tests.sh b/src/pybind/mgr/dashboard/run-backend-api-tests.sh index c9efb2d5bc1..630adac9e0a 100755 --- a/src/pybind/mgr/dashboard/run-backend-api-tests.sh +++ b/src/pybind/mgr/dashboard/run-backend-api-tests.sh @@ -30,7 +30,7 @@ setup_teuthology() { CURR_DIR=`pwd` BUILD_DIR="$CURR_DIR/../../../../build" - read -r -d '' TEUTHOLOFY_PY_REQS < /dev/null