From b312e97a30a9fa855abe65a3bcfb168d329460d9 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 21 May 2015 10:59:57 -0700 Subject: [PATCH] Think that integration tests are failing in json due to lack of json mimetype. Make a short wrapper to fix that. --- test/integration/roles/test_uri/files/testserver.py | 6 ++++++ test/integration/roles/test_uri/tasks/main.yml | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 test/integration/roles/test_uri/files/testserver.py diff --git a/test/integration/roles/test_uri/files/testserver.py b/test/integration/roles/test_uri/files/testserver.py new file mode 100644 index 0000000000..03cbfec507 --- /dev/null +++ b/test/integration/roles/test_uri/files/testserver.py @@ -0,0 +1,6 @@ +import mimetypes +import SimpleHTTPServer + +if __name__ == '__main__': + mimetypes.add_type('application/json', '.json') + SimpleHTTPServer.test() diff --git a/test/integration/roles/test_uri/tasks/main.yml b/test/integration/roles/test_uri/tasks/main.yml index 6072754f22..b6fc5094cb 100644 --- a/test/integration/roles/test_uri/tasks/main.yml +++ b/test/integration/roles/test_uri/tasks/main.yml @@ -37,6 +37,10 @@ dest: "{{files_dir}}/{{ item }}" with_sequence: start=0 end=30 format=fail%d.json +- copy: + src: "testserver.py" + dest: "{{ output_dir }}/testserver.py" + - name: verify that python2 is installed so this test can continue shell: which python2 register: py2