summaryrefslogtreecommitdiffstats
path: root/test/test_ansiblesyntax.py
blob: f71a52553cf83bfd150f26db5188b65f84abafef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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