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:
parent
226eb88078
commit
5cdc50f521
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user