Skip to content

Commit

Permalink
test(saltcheck): add test for service.running
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 15, 2019
1 parent 226eb88 commit 5cdc50f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cron/saltcheck-tests/service.tst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit 5cdc50f

Please sign in to comment.