Prepare un-flatmapping (#5350) (#5427)

* Add module name into fixtures directory name.

* Rename conftest.py to avoid collisions.

* Match filenames inside directories.

(cherry picked from commit fa924aae31)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2022-10-26 08:00:05 +02:00 committed by GitHub
commit 833530ab47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
368 changed files with 113 additions and 59 deletions

View file

@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
1. Clone project to `ansible_collections/community/general`
2. Change directory to the project one `cd ansible_collections/community/general`
3. Run `ansible-test units --docker -v --python 3.6 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
3. Run `ansible-test units --docker -v --python 3.10 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
## Adding tests
@ -23,5 +23,5 @@ SPDX-License-Identifier: GPL-3.0-or-later
2. New test cases should be defined in `test_interfaces_file.py`. Same for new test functions if needed
3. On first test run for a new combination of a test case and an interface configuration new set of golden files will be generated. In case of docker-based test approach that's going to fail due to RO mount option. The workaround is to run tests locally with Python 3 (3.7 in this example):
1. Install required modules with `pip3.7 install pytest-xdist pytest-mock mock`
3. Run tests with `ansible-test units --python 3.7 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
3. Run tests with `ansible-test units --python 3.10 tests/unit/plugins/modules/system/interfaces_file/test_interfaces_file.py`
4. Carefully verify newly created golden output files!

Some files were not shown because too many files have changed in this diff Show more