mirror of
https://github.com/saltstack-formulas/cron-formula.git
synced 2025-07-20 08:58:23 +02:00
fix(saltcheck): remove trailing spaces
This commit is contained in:
parent
9225b18202
commit
aada0ae835
@ -2,105 +2,105 @@
|
|||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
|
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
|
||||||
|
|
||||||
{%- if 'tasks' in cron %}
|
{%- if 'tasks' in cron %}
|
||||||
{%- for task,task_options in cron.tasks.items() %}
|
{%- for task,task_options in cron.tasks.items() %}
|
||||||
|
|
||||||
{%- if task_options.type == 'present' %}
|
{%- if task_options.type == 'present' %}
|
||||||
validate_cron.{{ task }}_exists:
|
validate_cron.{{ task }}_exists:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
assertion_section: identifier
|
assertion_section: identifier
|
||||||
expected-return: {{ task }}
|
expected-return: {{ task }}
|
||||||
|
|
||||||
{%- if 'minute' in task_options %}
|
{%- if 'minute' in task_options %}
|
||||||
validate_cron.{{ task }}_minute:
|
validate_cron.{{ task }}_minute:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
assertion_section: minute
|
assertion_section: minute
|
||||||
expected-return: '{{ task_options.minute }}'
|
expected-return: '{{ task_options.minute }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if 'hour' in task_options %}
|
{%- if 'hour' in task_options %}
|
||||||
validate_cron.{{ task }}_hour:
|
validate_cron.{{ task }}_hour:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion_section: hour
|
assertion_section: hour
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
expected-return: '{{ task_options.hour }}'
|
expected-return: '{{ task_options.hour }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if 'daymonth' in task_options %}
|
{%- if 'daymonth' in task_options %}
|
||||||
validate_cron.{{ task }}_daymonth:
|
validate_cron.{{ task }}_daymonth:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion_section: daymonth
|
assertion_section: daymonth
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
expected-return: '{{ task_options.daymonth }}'
|
expected-return: '{{ task_options.daymonth }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if 'month' in task_options %}
|
{%- if 'month' in task_options %}
|
||||||
validate_cron.{{ task }}_month:
|
validate_cron.{{ task }}_month:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion_section: month
|
assertion_section: month
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
expected-return: '{{ task_options.month }}'
|
expected-return: '{{ task_options.month }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if 'dayweek' in task_options %}
|
{%- if 'dayweek' in task_options %}
|
||||||
validate_cron.{{ task }}_dayweek:
|
validate_cron.{{ task }}_dayweek:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion_section: dayweek
|
assertion_section: dayweek
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
expected-return: '{{ task_options.dayweek }}'
|
expected-return: '{{ task_options.dayweek }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if 'comment' in task_options %}
|
{%- if 'comment' in task_options %}
|
||||||
validate_cron.{{ task }}_comment:
|
validate_cron.{{ task }}_comment:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion_section: comment
|
assertion_section: comment
|
||||||
assertion: assertEqual
|
assertion: assertEqual
|
||||||
expected-return: {{ task_options.comment }}
|
expected-return: {{ task_options.comment }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if 'commented' in task_options and task_options.commented %}
|
{%- if 'commented' in task_options and task_options.commented %}
|
||||||
validate_cron.{{ task }}_commented:
|
validate_cron.{{ task }}_commented:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion_section: commented
|
assertion_section: commented
|
||||||
assertion: assertTrue
|
assertion: assertTrue
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if task_options.type == 'absent' %}
|
{%- if task_options.type == 'absent' %}
|
||||||
validate_cron.{{ task }}_absent:
|
validate_cron.{{ task }}_absent:
|
||||||
module_and_function: cron.get_entry
|
module_and_function: cron.get_entry
|
||||||
args:
|
args:
|
||||||
- {{ task_options.user|default('root') }}
|
- {{ task_options.user|default('root') }}
|
||||||
- {{ task }}
|
- {{ task }}
|
||||||
assertion: assertFalse
|
assertion: assertFalse
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -12,4 +12,4 @@ verify_cron.service:
|
|||||||
module_and_function: service.{{ service_function }}
|
module_and_function: service.{{ service_function }}
|
||||||
args:
|
args:
|
||||||
- {{ cron.service }}
|
- {{ cron.service }}
|
||||||
assertion: assertTrue
|
assertion: assertTrue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user