question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for pdb mode for testinfra

See original GitHub issue
  • Feature request

Molecule and Ansible details

ansible 2.9.11
  config file = /home/amarao/git/nwaas/ansible.cfg
  configured module search path = ['/home/amarao/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/amarao/venvs/ansible29/lib/python3.8/site-packages/ansible
  executable location = /home/amarao/venvs/ansible29/bin/ansible
  python version = 3.8.6 (default, Sep 25 2020, 09:36:53) [GCC 10.2.0]
molecule 3.2.0a0
    ansible:2.9.11 python:3.8
    delegated:3.2.0a0 from molecule
    libvirt:0.0.3 from molecule_libvirt
    openstack:0.1 from molecule_openstack

installation method: pip

Desired Behavior

Right now molecule does not provide a tty to testinfra, so pytest --pdb can not interact with user. This mode can be enabled by this sinppet of molecule config:

verifier:
  name: testinfra
  options:
    pdb: true

It would be nice to have some kind of ‘interactive’ command line option for molecule to allow operators to have pdb shell in the test. This option should:

  1. Add --pdb option to testinfra
  2. Allow interactive shell for testinfra invocation.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amaraocommented, Feb 19, 2021

@aryn-lacy, had I missed something? How to invoke pdb for testinfra in molecule?

1reaction
aryn-lacycommented, Feb 18, 2021

This is already a thing and works exactly as described above. Should this issue be closed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Add support for pdb mode for testinfra - - Bountysource
Coming soon: A brand new website interface for an even better experience!
Read more >
Modules — testinfra 7.0.2.dev1+gfc4bfd1.d20221210 ...
This module is only available with the ansible connection backend. Check mode is enabled by default, you can disable it with check=False ....
Read more >
pantsbuild.pants.testinfra · PyPI
Improved artifact cache usability by allowing tasks to opt-in to a mode that generates ... Re-add support for reading from a local .m2...
Read more >
Running TestScripts — pyATS Documentation - DevNet
Before heading into execution modes, we need to first expand on how aetest ... you may also add a Shebang to your script...
Read more >
7.1.x PDF - pytest Documentation
Pytest supports several ways to run and select tests from the ... pytest plugin which adds pdb helper commands related to pytest.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found