fix(saltcheck): fix invalid `service` test
This commit is contained in:
parent
d2c95440e4
commit
677c956de4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue