summaryrefslogtreecommitdiffstats
path: root/test/test_ansiblesyntax.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
commit2fe34b6444502079dc0b84365ce82dbc92de308e (patch)
tree8fedcab52bbbc3db6c5aa909a88a7a7b81685018 /test/test_ansiblesyntax.py
parentInitial commit. (diff)
downloadansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.tar.xz
ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.zip
Adding upstream version 6.17.2.upstream/6.17.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test/test_ansiblesyntax.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_ansiblesyntax.py b/test/test_ansiblesyntax.py
new file mode 100644
index 0000000..f71a525
--- /dev/null
+++ b/test/test_ansiblesyntax.py
@@ -0,0 +1,19 @@
+"""Test Ansible Syntax.
+
+This module contains tests that validate that linter does not produce errors
+when encountering what counts as valid Ansible syntax.
+"""
+from ansiblelint.testing import RunFromText
+
+PB_WITH_NULL_TASKS = """\
+---
+- name: Fixture for test_null_tasks
+ hosts: all
+ tasks:
+"""
+
+
+def test_null_tasks(default_text_runner: RunFromText) -> None:
+ """Assure we do not fail when encountering null tasks."""
+ results = default_text_runner.run_playbook(PB_WITH_NULL_TASKS)
+ assert not results