From 5b59c87fd84b2b029ba75d7cd05fbb661f9666d5 Mon Sep 17 00:00:00 2001 From: alfonsomthd Date: Thu, 14 Mar 2019 09:28:49 +0100 Subject: [PATCH] mgr/dashboard: add test_module_selftest to API tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * This test suite helps to catch mgr module regressions introduced by dashboard feature/bugfix. * Fixed: 'ceph -w' now behaves properly for Python 3. Fixes: https://tracker.ceph.com/issues/38394 Signed-off-by: Alfonso Martínez --- src/ceph.in | 2 ++ src/pybind/mgr/dashboard/run-backend-api-tests.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ceph.in b/src/ceph.in index c279960d124e4..f060023f57c6b 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1065,6 +1065,8 @@ def main(): # an awfully simple callback def watch_cb(arg, line, channel, name, who, stamp_sec, stamp_nsec, seq, level, msg): # Filter on channel + if sys.version_info[0] >= 3: + channel = channel.decode('utf-8') if (channel == parsed_args.watch_channel or \ parsed_args.watch_channel == "*"): print(line.decode('utf-8')) diff --git a/src/pybind/mgr/dashboard/run-backend-api-tests.sh b/src/pybind/mgr/dashboard/run-backend-api-tests.sh index 9a3a47fe76386..1cba1de980d79 100755 --- a/src/pybind/mgr/dashboard/run-backend-api-tests.sh +++ b/src/pybind/mgr/dashboard/run-backend-api-tests.sh @@ -109,7 +109,7 @@ run_teuthology_tests() { TEST_CASES='' if [[ "$@" == '' || "$@" == '--create-cluster-only' ]]; then TEST_CASES=`for i in \`ls $BUILD_DIR/../qa/tasks/mgr/dashboard/test_*\`; do F=$(basename $i); M="${F%.*}"; echo -n " tasks.mgr.dashboard.$M"; done` - TEST_CASES="tasks.mgr.test_dashboard $TEST_CASES" + TEST_CASES="tasks.mgr.test_module_selftest tasks.mgr.test_dashboard $TEST_CASES" if [[ "$@" == '--create-cluster-only' ]]; then OPTIONS="$@" fi -- 2.47.3