]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm/tests: add pyyaml dependency
authorGuillaume Abrioux <gabrioux@ibm.com>
Mon, 18 Dec 2023 14:26:04 +0000 (14:26 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 15:07:21 +0000 (15:07 +0000)
node-proxy requires this dependency so it needs to be added as
dependency for tox testing.

Typical failure:

```
ImportError while importing test module '/root/ceph/src/cephadm/tests/test_agent.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_agent.py:10: in <module>
    _cephadm = import_cephadm()
tests/fixtures.py:14: in import_cephadm
    import cephadm as _cephadm
cephadm.py:32: in <module>
    from cephadmlib.node_proxy.main import NodeProxy
cephadmlib/node_proxy/main.py:2: in <module>
    from .redfishdellsystem import RedfishDellSystem
cephadmlib/node_proxy/redfishdellsystem.py:2: in <module>
    from .baseredfishsystem import BaseRedfishSystem
cephadmlib/node_proxy/baseredfishsystem.py:2: in <module>
    from .basesystem import BaseSystem
cephadmlib/node_proxy/basesystem.py:2: in <module>
    from .util import Config
cephadmlib/node_proxy/util.py:2: in <module>
    import yaml
E   ModuleNotFoundError: No module named 'yaml'
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/cephadm/tox.ini

index 38241a1c763bc023ce3ef6598d33163de6886f84..4871c186b3e383d6484550fd118e99d43ec1ce88 100644 (file)
@@ -38,6 +38,7 @@ deps =
   pyfakefs >= 5, < 6 ; python_version >= "3.7"
   mock
   pytest
+  pyyaml
 commands=pytest {posargs}
 
 [testenv:mypy]