(CTTC) NBI unitary tests not running and/or not working
Reporters
- Carlos Manso (CTTC)
- Lluis Gifre (CTTC)
Description
The NBI unitary tests not running/working.
- Review unitary tests for DebugAPI and IETF L2VPN.
- Rename
test_unitary.py
totest_ietf_l2vpn.py
- Add again test for
test_ietf_l2vpn.py
, removed as it fails - Add scripts
scripts/run_tests_locally-nbi-[plugin-name].sh
- Add tests to GitLab CI/CD pipeline.
Deployment environment
- Operating System (include version): Description: Ubuntu 22.04.3 LTS
- MicroK8s (include version and add-ons): v1.24.17
- TeraFlowSDN (include release/branch-name/commit-id): develop/240eeaaa
Sequence of actions that resulted in the bug
export PROJECTDIR=`pwd`
export RCFILE=$PROJECTDIR/coverage/.coveragerc
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose nbi/tests/test_debug_api.py
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose nbi/tests/test_ietf_l2vpn.py
Document the explicit error
ImportError while importing test module '/home/cmanso/tfs-ctrl/src/nbi/tests/test_debug_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../.pyenv/versions/3.9.16/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
nbi/tests/test_debug_api.py:30: in <module>
from .Objects import (
E ModuleNotFoundError: No module named 'src.nbi.tests.Objects'
Expected behaviour
Test running and passing
Edited by Lluis Gifre Renom