Closed unglaublicherdude closed 4 years ago
Are you actually planning to remove testinfra? Because that is atm, the main way we test stuff.
The pinned issue #2560 (Migrating to molecule v3) states:
if you use testinfra, add it as a pip dependency, it is no longer installed by default
From what I read in the doc/tickets (and believe I understood), there is absolutely no intent to remove testinfra. In an effort to lower the number of mandatory dependencies, It is just not the default verifier any more. I do use testinfa and migrated. An example result here: https://travis-ci.org/ansible-ThoTeam/nexus3-oss/jobs/655689626#L2239
Oh. IMHO that's a bad decision. I guess, for most of the molecule users testinfra is still the default. And it is a really bad user experience, when I can initialize something with your docker image, but the run itself without custom changes just fails.
Workaround
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):$(pwd) -w $(pwd) --user root quay.io/ansible/molecule:3.0.2 /bin/sh -c "pip3 install testinfra; molecule test -s default"
Closing because it was fixed on master, next release will include testinfra inside the container.
I was getting this error today when testing molecule & testinfra for the first time.
running: pip install pytest-testinfra fixed it for me!
(note if you installed 'testinfra' run 'pip uninstall testinfra' first as its been deprecated)
Issue Type
Molecule and Ansible details
Molecule installation method (one of):
Ansible installation method (one of):
Detail any linters or test runners used:
Desired Behavior
The default tests should run without any problems
Actual Behaviour
an error is thrown