Skip to content

Commit

Permalink
fix(saltcheck): remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 15, 2019
1 parent 9225b18 commit aada0ae
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 95 deletions.
188 changes: 94 additions & 94 deletions cron/saltcheck-tests/config.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,105 @@
# vim: ft=sls

{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
{%- if 'tasks' in cron %}
{%- for task,task_options in cron.tasks.items() %}
{%- if task_options.type == 'present' %}
validate_cron.{{ task }}_exists:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion: assertEqual
assertion_section: identifier
expected-return: {{ task }}
{%- if 'minute' in task_options %}
validate_cron.{{ task }}_minute:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion: assertEqual
assertion_section: minute

{%- if 'tasks' in cron %}
{%- for task,task_options in cron.tasks.items() %}

{%- if task_options.type == 'present' %}
validate_cron.{{ task }}_exists:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion: assertEqual
assertion_section: identifier
expected-return: {{ task }}

{%- if 'minute' in task_options %}
validate_cron.{{ task }}_minute:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion: assertEqual
assertion_section: minute
expected-return: '{{ task_options.minute }}'
{%- endif %}
{%- if 'hour' in task_options %}
validate_cron.{{ task }}_hour:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: hour
assertion: assertEqual
{%- endif %}

{%- if 'hour' in task_options %}
validate_cron.{{ task }}_hour:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: hour
assertion: assertEqual
expected-return: '{{ task_options.hour }}'
{%- endif %}
{%- if 'daymonth' in task_options %}
validate_cron.{{ task }}_daymonth:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: daymonth
assertion: assertEqual
{%- endif %}

{%- if 'daymonth' in task_options %}
validate_cron.{{ task }}_daymonth:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: daymonth
assertion: assertEqual
expected-return: '{{ task_options.daymonth }}'
{%- endif %}
{%- endif %}

{%- if 'month' in task_options %}
validate_cron.{{ task }}_month:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: month
assertion: assertEqual
validate_cron.{{ task }}_month:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: month
assertion: assertEqual
expected-return: '{{ task_options.month }}'
{%- endif %}
{%- if 'dayweek' in task_options %}
validate_cron.{{ task }}_dayweek:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: dayweek
assertion: assertEqual
{%- endif %}

{%- if 'dayweek' in task_options %}
validate_cron.{{ task }}_dayweek:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: dayweek
assertion: assertEqual
expected-return: '{{ task_options.dayweek }}'
{%- endif %}
{%- if 'comment' in task_options %}
validate_cron.{{ task }}_comment:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: comment
assertion: assertEqual
expected-return: {{ task_options.comment }}
{%- endif %}
{%- if 'commented' in task_options and task_options.commented %}
validate_cron.{{ task }}_commented:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: commented
assertion: assertTrue
{%- endif %}
{%- endif %}
{%- if task_options.type == 'absent' %}
validate_cron.{{ task }}_absent:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion: assertFalse
{%- endif %}

{%- if 'comment' in task_options %}
validate_cron.{{ task }}_comment:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: comment
assertion: assertEqual
expected-return: {{ task_options.comment }}
{%- endif %}

{%- if 'commented' in task_options and task_options.commented %}
validate_cron.{{ task }}_commented:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion_section: commented
assertion: assertTrue
{%- endif %}
{%- endif %}

{%- if task_options.type == 'absent' %}
validate_cron.{{ task }}_absent:
module_and_function: cron.get_entry
args:
- {{ task_options.user|default('root') }}
- {{ task }}
assertion: assertFalse
{%- endif %}
{%- endfor %}

{%- endfor %}
{%- endif %}
2 changes: 1 addition & 1 deletion cron/saltcheck-tests/service.tst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ verify_cron.service:
module_and_function: service.{{ service_function }}
args:
- {{ cron.service }}
assertion: assertTrue
assertion: assertTrue

0 comments on commit aada0ae

Please sign in to comment.