0
0
mirror of https://github.com/saltstack-formulas/cron-formula.git synced 2025-02-17 17:54:48 +01:00

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

View File

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