diff options
Diffstat (limited to 'test/test_adjacent_plugins.py')
-rw-r--r-- | test/test_adjacent_plugins.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_adjacent_plugins.py b/test/test_adjacent_plugins.py new file mode 100644 index 0000000..3e642ce --- /dev/null +++ b/test/test_adjacent_plugins.py @@ -0,0 +1,25 @@ +"""Test ability to recognize adjacent modules/plugins.""" + +import logging + +import pytest + +from ansiblelint.rules import RulesCollection +from ansiblelint.runner import Runner + + +def test_adj_action( + default_rules_collection: RulesCollection, + caplog: pytest.LogCaptureFixture, +) -> None: + """Assures local collections are found.""" + playbook_path = "examples/playbooks/adj_action.yml" + + with caplog.at_level(logging.DEBUG): + runner = Runner(playbook_path, rules=default_rules_collection, verbosity=1) + results = runner.run() + assert "Unable to load module" not in caplog.text + assert "Unable to resolve FQCN" not in caplog.text + + assert len(runner.lintables) == 1 + assert len(results) == 0 |