0
0
mirror of https://github.com/saltstack-formulas/cron-formula.git synced 2024-11-27 23:07:46 +01:00

test(saltcheck): add test for service.running

This commit is contained in:
Imran Iqbal 2019-10-15 17:48:28 +01:00
parent 226eb88078
commit 5cdc50f521
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819

View File

@ -4,8 +4,10 @@
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
{%- set service_function = 'disabled' %}
{%- set service_running = 'assertFalse' %}
{%- if 'enabled' not in cron or ( 'enabled' in cron and cron.enabled ) %}
{%- set service_function = 'enabled' %}
{%- set service_running = 'assertTrue' %}
{%- endif %}
verify_cron.service_available:
@ -19,3 +21,9 @@ verify_cron.service_{{ service_function }}:
args:
- {{ cron.service }}
assertion: assertTrue
verify_cron.service_running:
module_and_function: service.status
args:
- {{ cron.service }}
assertion: {{ service_running }}