mirror of
https://github.com/saltstack-formulas/cron-formula.git
synced 2024-11-28 01:17:49 +01:00
test(saltcheck): test for commented
and not commented
This commit is contained in:
parent
007970f935
commit
50706119fa
@ -20,7 +20,7 @@ cron.{{ task }}:
|
||||
- {{ section }}: '{{ task_options.get(section) }}'
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if 'commented' in task_options and task_options.commented %}
|
||||
{%- if task_options.commented|d(False) %}
|
||||
- commented: True
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
@ -44,16 +44,18 @@ validate_cron.{{ task }}_{{ section }}:
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{%- if 'commented' in task_options and task_options.commented %}
|
||||
{%- set assertion = 'assertFalse' %}
|
||||
{%- if task_options.commented|d(False) %}
|
||||
{%- set assertion = 'assertTrue' %}
|
||||
{%- endif %}
|
||||
validate_cron.{{ task }}_commented:
|
||||
module_and_function: cron.get_entry
|
||||
args:
|
||||
- {{ task_options.user|d('root') }}
|
||||
- {{ task }}
|
||||
assertion: assertTrue
|
||||
assertion: {{ assertion }}
|
||||
assertion_section: commented
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user