From 26cfa4f6c48ccb2a915915a7bc73b00303fa92d8 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Oct 2019 14:17:29 +0100 Subject: [PATCH] fix(saltcheck): update for `cron` instead of `cron_settings` --- cron/saltcheck-tests/config.tst | 6 +++--- cron/saltcheck-tests/install.tst | 4 ++-- cron/saltcheck-tests/service.tst | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cron/saltcheck-tests/config.tst b/cron/saltcheck-tests/config.tst index e8802bc..ac37344 100644 --- a/cron/saltcheck-tests/config.tst +++ b/cron/saltcheck-tests/config.tst @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "cron/saltcheck-tests/map.jinja" import cron_settings with context %} +{%- from "cron/saltcheck-tests/map.jinja" import cron with context %} -{%- if 'tasks' in cron_settings %} - {%- for task,task_options in cron_settings.tasks.items() %} +{%- if 'tasks' in cron %} + {%- for task,task_options in cron.tasks.items() %} {%- if task_options.type == 'present' %} validate_cron.{{ task }}_exists: diff --git a/cron/saltcheck-tests/install.tst b/cron/saltcheck-tests/install.tst index 8547f55..aa02be9 100644 --- a/cron/saltcheck-tests/install.tst +++ b/cron/saltcheck-tests/install.tst @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "cron/saltcheck-tests/map.jinja" import cron_settings with context %} +{%- from "cron/saltcheck-tests/map.jinja" import cron with context %} verify_cron.install: module_and_function: pkg.version args: - - {{ cron_settings.pkg }} + - {{ cron.pkg }} assertion: assertNotEmpty diff --git a/cron/saltcheck-tests/service.tst b/cron/saltcheck-tests/service.tst index 43e5baa..26b72b6 100644 --- a/cron/saltcheck-tests/service.tst +++ b/cron/saltcheck-tests/service.tst @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "cron/saltcheck-tests/map.jinja" import cron_settings with context %} +{%- from "cron/saltcheck-tests/map.jinja" import cron with context %} cron.service: -{%- if 'enabled' not in cron_settings or ( 'enabled' in cron_settings and cron_settings.enabled ) %} +{%- if 'enabled' not in cron or ( 'enabled' in cron and cron.enabled ) %} service.running: - - name: {{ cron_settings.service }} + - name: {{ cron.service }} - enable: True {%- else %} service.dead: - - name: {{ cron_settings.service }} + - name: {{ cron.service }} - enable: False {%- endif %}