0
0
mirror of https://github.com/saltstack-formulas/cron-formula.git synced 2024-12-01 02:31:08 +01:00
cron-formula/cron/saltcheck-tests/service.tst

30 lines
789 B
Scilab
Raw Normal View History

2019-04-08 17:40:48 +02:00
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
2019-04-08 17:40:48 +02:00
{%- 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' %}
2019-04-08 17:40:48 +02:00
{%- endif %}
verify_cron.service_available:
module_and_function: service.available
args:
- {{ cron.service }}
assertion: assertTrue
verify_cron.service_{{ service_function }}:
module_and_function: service.{{ service_function }}
args:
- {{ cron.service }}
2019-10-14 16:39:38 +02:00
assertion: assertTrue
verify_cron.service_running:
module_and_function: service.status
args:
- {{ cron.service }}
assertion: {{ service_running }}