summaryrefslogtreecommitdiff
path: root/test/integration/targets/sensu_handler/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/sensu_handler/tasks/main.yml')
-rw-r--r--test/integration/targets/sensu_handler/tasks/main.yml11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/integration/targets/sensu_handler/tasks/main.yml b/test/integration/targets/sensu_handler/tasks/main.yml
index e85543f20b..0c0b56d23e 100644
--- a/test/integration/targets/sensu_handler/tasks/main.yml
+++ b/test/integration/targets/sensu_handler/tasks/main.yml
@@ -28,10 +28,10 @@
state: "present"
register: handler_twice
-- name: Retrieve configuration file stat
- stat:
- path: "{{ handler['file'] }}"
- register: handler_stat
+- name: Retrieve configuration file
+ slurp:
+ src: "{{ handler['file'] }}"
+ register: handler_config
- name: Assert that handler data was set successfully and properly
assert:
@@ -40,7 +40,6 @@
- "handler is changed"
- "handler_twice is successful"
- "handler_twice is not changed"
- - "handler_stat.stat.exists == true"
- "handler['name'] == 'handler'"
- "handler['file'] == '/etc/sensu/conf.d/handlers/handler.json'"
- "handler['config']['type'] == 'pipe'"
@@ -51,7 +50,7 @@
- name: Assert that the handler configuration file is actually configured properly
vars:
- config: "{{ lookup('file', handler['file']) | from_json }}"
+ config: "{{ handler_config.content | b64decode | from_json }}"
assert:
that:
- "'handler' in config['handlers']"