fix(saltcheck): fix invalid `service` test

This commit is contained in:
Imran Iqbal 2019-10-14 14:35:33 +01:00
parent d2c95440e4
commit 677c956de4
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
1 changed files with 8 additions and 8 deletions

View File

@ -3,13 +3,13 @@
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
cron.service:
{%- set service_function = 'disabled' %}
{%- if 'enabled' not in cron or ( 'enabled' in cron and cron.enabled ) %}
service.running:
- name: {{ cron.service }}
- enable: True
{%- else %}
service.dead:
- name: {{ cron.service }}
- enable: False
{%- set service_function = 'enabled' %}
{%- endif %}
verify_cron.service:
module_and_function: service.{{ service_function }}
args:
- {{ cron.service }}
assertion: assertTrue