diff options
Diffstat (limited to 'test/integration/targets/sensu_handler/tasks/transport.yml')
-rw-r--r-- | test/integration/targets/sensu_handler/tasks/transport.yml | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/integration/targets/sensu_handler/tasks/transport.yml b/test/integration/targets/sensu_handler/tasks/transport.yml index c40ee56202..34816194fa 100644 --- a/test/integration/targets/sensu_handler/tasks/transport.yml +++ b/test/integration/targets/sensu_handler/tasks/transport.yml @@ -20,17 +20,16 @@ name: "transport_handler" register: handler -- name: Retrieve configuration file stat - stat: - path: "{{ handler['file'] }}" - register: handler_stat +- name: Retrieve configuration file + slurp: + src: "{{ handler['file'] }}" + register: handler_config - name: Validate transport handler return data assert: that: - "handler is successful" - "handler is changed" - - "handler_stat.stat.exists == true" - "handler['name'] == 'transport'" - "handler['file'] == '/etc/sensu/conf.d/handlers/transport.json'" - "handler['config']['type'] == 'transport'" @@ -41,7 +40,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: - "'transport' in config['handlers']" |