Bug #48338
mgr/dashboard: can't run tox py3 env outside of ctest
% Done:
0%
Source:
Tags:
Backport:
Regression:
Yes
Severity:
3 - minor
Description
The unittest can't be run with tox command:
╭─root@ceph-master /ceph/src/pybind/mgr/dashboard ‹master-1124*› ╰─# activate (node-env) ╭─root@ceph-master /ceph/src/pybind/mgr/dashboard ‹master-1124*› ╰─# tox -e py3 py3 create: /ceph/src/pybind/mgr/dashboard/.tox/py3 py3 installdeps: -rrequirements.txt, -cconstraints.txt, -rrequirements-test.txt, -rrequirements-extra.txt py3 create: /ceph/src/pybind/mgr/dashboard/.tox/py3 py3 installdeps: -rrequirements.txt, -cconstraints.txt, -rrequirements-test.txt, -rrequirements-extra.txt py3 installed: attrs==20.3.0,bcrypt==3.1.4,-e git+https://github.com/ceph/ceph.git@4ee600b3548e2e5c35f5d3130ad1de25181d67ff#egg=ceph&subdirectory=src/python-common,certifi==2020.11.8,cffi==1.14.3,chardet==3.0.4,cheroot==8.4.7,CherryPy==13.1.0,coverage==5.3,cryptography==3.2.1,defusedxml==0.5.0,idna==2.7,iniconfig==1.1.1,isodate==0.6.0,jaraco.functools==3.0.1,lxml==4.6.1,more-itertools==4.1.0,packaging==20.4,pluggy==0.13.1,portend==2.7.0,prettytable==2.0.0,py==1.9.0,pycparser==2.20,pyfakefs==4.3.1,PyJWT==1.6.4,pyOpenSSL==17.5.0,pyparsing==2.4.7,pytest==6.1.2,pytest-cov==2.10.1,pytest-instafail==0.4.2,python3-saml==1.4.1,pytz==2020.4,PyYAML==5.3.1,repoze.lru==0.7,requests==2.20.0,Routes==2.4.1,six==1.15.0,tempora==4.0.1,toml==0.10.2,urllib3==1.24.3,wcwidth==0.2.5,xmlsec==1.3.9 py3 run-test-pre: PYTHONHASHSEED='382103600' py3 run-test: commands[0] | pytest ============================= test session starts ============================== platform linux -- Python 3.8.5, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 cachedir: .tox/py3/.pytest_cache rootdir: /ceph/src/pybind/mgr/dashboard, configfile: tox.ini plugins: cov-2.10.1, instafail-0.4.2, pyfakefs-4.3.1 _________________________ ERROR collecting __init__.py _________________________ __init__.py:55: in <module> from .module import Module, StandbyModule # noqa: F401 module.py:21: in <module> from .controllers import generate_routes, json_error_page controllers/__init__.py:20: in <module> from ceph_argparse import ArgumentFormat # type: ignore E ModuleNotFoundError: No module named 'ceph_argparse' _________________________ ERROR collecting awsauth.py __________________________ /usr/lib64/python3.8/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1014: in _gcd_import ??? <frozen importlib._bootstrap>:991: in _find_and_load ??? <frozen importlib._bootstrap>:961: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:219: in _call_with_frames_removed ??? <frozen importlib._bootstrap>:1014: in _gcd_import ??? <frozen importlib._bootstrap>:991: in _find_and_load ??? <frozen importlib._bootstrap>:975: in _find_and_load_unlocked ... ERROR tests/test_settings.py ERROR tests/test_sso.py - ModuleNotFoundError: No module named 'ceph_argparse' ERROR tests/test_sso.py ERROR tests/test_task.py - ModuleNotFoundError: No module named 'ceph_argparse' ERROR tests/test_task.py ERROR tests/test_tools.py - ModuleNotFoundError: No module named 'ceph_argparse' ERROR tests/test_tools.py ERROR tests/test_versioning.py - ModuleNotFoundError: No module named 'ceph_a... ERROR tests/test_versioning.py !!!!!!!!!!!!!!!!!! Interrupted: 133 errors during collection !!!!!!!!!!!!!!!!!!! ======================== 1 warning, 133 errors in 7.10s ======================== ERROR: InvocationError for command /ceph/src/pybind/mgr/dashboard/.tox/py3/bin/pytest (exited with code 2) ___________________________________ summary ____________________________________ ERROR: py3: commands failed
But it works within build folder when running `ctest -V -R run-tox-mgr-dashboard`.
History
#1 Updated by Kiefer Chang 2 months ago
- Status changed from New to Fix Under Review
- Assignee set to Kiefer Chang
- Pull request ID set to 38260
#2 Updated by Ernesto Puerta 2 months ago
- Status changed from Fix Under Review to Closed