From 8a2b99d1eeada0bf5bc4a9c3ac37dd61c11d8d6e Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 25 Mar 2019 15:26:29 -0700 Subject: [PATCH] Fix rabbitmq_publish integration test. --- .../targets/rabbitmq_publish/meta/main.yml | 1 + .../targets/rabbitmq_publish/tasks/ubuntu.yml | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/integration/targets/rabbitmq_publish/meta/main.yml b/test/integration/targets/rabbitmq_publish/meta/main.yml index 05ab59000bb..f0eb571b9a5 100644 --- a/test/integration/targets/rabbitmq_publish/meta/main.yml +++ b/test/integration/targets/rabbitmq_publish/meta/main.yml @@ -1,2 +1,3 @@ dependencies: - setup_rabbitmq + - setup_remote_tmp_dir diff --git a/test/integration/targets/rabbitmq_publish/tasks/ubuntu.yml b/test/integration/targets/rabbitmq_publish/tasks/ubuntu.yml index fe8e9d000ca..7506fc368ef 100644 --- a/test/integration/targets/rabbitmq_publish/tasks/ubuntu.yml +++ b/test/integration/targets/rabbitmq_publish/tasks/ubuntu.yml @@ -34,11 +34,16 @@ - "'amq.gen' in rabbit_random_queue_output.result.queue" - "'text/plain' in rabbit_random_queue_output.result.content_type" +- name: Copy binary to remote + copy: + src: "{{ role_path }}/files/image.gif" + dest: "{{ remote_tmp_dir }}/image.gif" + - name: Publish binary to a queue rabbitmq_publish: url: "amqp://guest:guest@localhost:5672/%2F" queue: publish_test - src: "{{ role_path }}/files/image.gif" + src: "{{ remote_tmp_dir }}/image.gif" register: rabbitmq_publish_file - assert: @@ -51,7 +56,7 @@ rabbitmq_publish: url: "amqp://guest:guest@localhost:5672/%2F" queue: 'publish_test' - src: "{{ role_path }}/files/image.gif" + src: "{{ remote_tmp_dir }}/image.gif" body: blah register: rabbit_basic_fail_output1 ignore_errors: yes @@ -141,7 +146,7 @@ rabbitmq_publish: url: "amqp://guest:guest@localhost:5672/%2F" queue: 'publish_test' - src: "{{ role_path }}/files/image.gif" + src: "{{ remote_tmp_dir }}/image.gif" headers: myHeader: Value1 secondHeader: Value2