Open evgeni opened 6 months ago
The same happens when using pytest --molecule
:
============================= test session starts ==============================
platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0 -- /opt/hostedtoolcache/Python/3.11.8/x64/bin/python
cachedir: .pytest_cache
ansible: 2.16.5.post0
rootdir: /home/runner/work/namespace.collection/namespace.collection
plugins: ansible-24.1.2
collecting ... collected 10 items
collections/ansible_collections/namespace/collection/roles/agent/molecule/debian/molecule.yml::test0 PASSED [ 10%]
collections/ansible_collections/namespace/collection/roles/agent/molecule/redhat/molecule.yml::test1 PASSED [ 20%]
collections/ansible_collections/namespace/collection/roles/repository/molecule/debian/molecule.yml::test2 PASSED [ 30%]
collections/ansible_collections/namespace/collection/roles/repository/molecule/redhat/molecule.yml::test3 PASSED [ 40%]
collections/ansible_collections/namespace/collection/roles/repository/molecule/suse/molecule.yml::test4 PASSED [ 50%]
roles/agent/molecule/debian/molecule.yml::test5 PASSED [ 60%]
roles/agent/molecule/redhat/molecule.yml::test6 PASSED [ 70%]
roles/repository/molecule/debian/molecule.yml::test7 PASSED [ 80%]
roles/repository/molecule/redhat/molecule.yml::test8 PASSED [ 90%]
roles/repository/molecule/suse/molecule.yml::test9 PASSED [100%]
=============================== warnings summary ===============================
In my collection I define the molecule tests like this (pretty much copy paste from the readme):
Now, when the testsuite runs, it seems to copy the collection to
collections/ansible_collections/<namespace>/<name>
, resulting in the following output:See how the tests are duplicated for
collections/ansible_collections/namespace/collection/tests/test_molecule.py
andtests/test_molecule.py
?Additionally, re-running the tests now fails (when executed on a non-ephemeral node, like a laptop):