8000 Allow os_walk to follow symlinks by ragingpastry · Pull Request #3026 · ansible/molecule · GitHub
[go: up one dir, main page]

Skip to content

Allow os_walk to follow symlinks - #3026

Merged
ssbarnea merged 1 commit into
ansible:masterfrom
ragingpastry:fix/3021-testinfra-symlinks
Jan 7, 2021
Merged

ssbarnea merged 1 commit into
ansible:masterfrom
ragingpastry:fix/3021-testinfra-symlinks

Conversation

@ragingpastry
@ragingpastry ragingpastry commented Jan 6, 2021 •
Copy link
Copy Markdown
Contributor

Allows the testinfra verifier to follow symlinks in the tests
directory.

This fixes a bug described here:
#3021

Previously, os_walk would not follow symlinks. This would break scenarios where you place tests in a common test directory.

For example the following directory structure:

molecule
├── common
│   └── unit
│       ├── test_ldap.py
│       └── test_zabbix.py
├── default
│   ├── conftest.py
│   ├── converge.yml
│   ├── create.yml
│   ├── Dockerfile.j2
│   ├── INSTALL.rst
│   ├── molecule.yml
│   ├── prepare.yml
│   ├── requirements.yml
│   └── tests
│       ├── conftest.py
└── zabbix-4.4.9
    ├── converge.yml
    ├── create.yml
    ├── Dockerfile.j2
    ├── INSTALL.rst
    ├── molecule.yml
    ├── prepare.yml
    ├── requirements.yml
    └── tests
        ├── conftest.py
        └── unit -> ../../common/unit

When running molecule verify -s zabbix-4.4.9 no tests would be found.

Allows the testinfra verifier to follow symlinks in the tests
directory.

This fixes a bug described here:
ansible#3021
@ssbarnea ssbarnea added the bug label Jan 7, 2021
@ssbarnea ssbarnea changed the title fix: allow os_walk to follow symlinks Allow os_walk to follow symlinks Jan 7, 2021
@ssbarnea
ssbarnea merged commit 66449fc into ansible:master Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0