Fix rabbitmq_publish integration test.

This commit is contained in:
Matt Clay 2019-03-25 15:26:29 -07:00
parent 8106502424
commit 8a2b99d1ee
2 changed files with 9 additions and 3 deletions

View file

@ -1,2 +1,3 @@
dependencies: dependencies:
- setup_rabbitmq - setup_rabbitmq
- setup_remote_tmp_dir

View file

@ -34,11 +34,16 @@
- "'amq.gen' in rabbit_random_queue_output.result.queue" - "'amq.gen' in rabbit_random_queue_output.result.queue"
- "'text/plain' in rabbit_random_queue_output.result.content_type" - "'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 - name: Publish binary to a queue
rabbitmq_publish: rabbitmq_publish:
url: "amqp://guest:guest@localhost:5672/%2F" url: "amqp://guest:guest@localhost:5672/%2F"
queue: publish_test queue: publish_test
src: "{{ role_path }}/files/image.gif" src: "{{ remote_tmp_dir }}/image.gif"
register: rabbitmq_publish_file register: rabbitmq_publish_file
- assert: - assert:
@ -51,7 +56,7 @@
rabbitmq_publish: rabbitmq_publish:
url: "amqp://guest:guest@localhost:5672/%2F" url: "amqp://guest:guest@localhost:5672/%2F"
queue: 'publish_test' queue: 'publish_test'
src: "{{ role_path }}/files/image.gif" src: "{{ remote_tmp_dir }}/image.gif"
body: blah body: blah
register: rabbit_basic_fail_output1 register: rabbit_basic_fail_output1
ignore_errors: yes ignore_errors: yes
@ -141,7 +146,7 @@
rabbitmq_publish: rabbitmq_publish:
url: "amqp://guest:guest@localhost:5672/%2F" url: "amqp://guest:guest@localhost:5672/%2F"
queue: 'publish_test' queue: 'publish_test'
src: "{{ role_path }}/files/image.gif" src: "{{ remote_tmp_dir }}/image.gif"
headers: headers:
myHeader: Value1 myHeader: Value1
secondHeader: Value2 secondHeader: Value2