]> 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 16:01:04 +0000 (16:01 +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>
(cherry picked from commit 6e7ea5172ac489c01e0a073acf869bcf6982a2b4)

src/cephadm/tox.ini

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