From 729b621ccb0f9b10a754221de5066dbe81246e0e Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Sat, 5 Mar 2016 17:31:21 +0100 Subject: [PATCH] Fix check htpasswd in location (replace echo test) --- tests/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test.yml b/tests/test.yml index 7dadbd1..fb178e6 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -191,9 +191,9 @@ copy: dest="{{ item }}/index.html" content="Index HTML test OK\n" with_items: ['{{ nginx_root }}/test.local/public', '/var/tmp', '{{ nginx_root }}/test-htpasswd-all.local/public', '{{ nginx_root }}/test-ssl.local/public', '{{ nginx_root }}/test-ssl-predeployed.local/public'] - name: -- Create directory -- - file: path={{ nginx_root }}/test-htpasswd-all.local/public/hello state=directory + file: path={{ nginx_root }}/test-htpasswd.local/public/hello state=directory - name: -- Add HTML file hello -- - copy: dest="{{ nginx_root }}/test-htpasswd-all.local/public/hello/index.html" content="hello\n" + copy: dest="{{ nginx_root }}/test-htpasswd.local/public/hello/index.html" content="hello\n" # -------------------------------- # Simple vhosts tests # -------------------------------- @@ -229,17 +229,17 @@ # Basic Auth # -------------------------------- - name: -- VERIFY AUTH BASIC NONE -- - command: "curl -H 'Host: test-htpasswd.local' http://127.0.0.1/hello" + command: "curl -H 'Host: test-htpasswd.local' http://127.0.0.1/hello/" changed_when: false register: authnone failed_when: authnone.stdout.find('401 Authorization Required') == -1 - name: -- VERIFY AUTH BASIC FAIL -- - command: "curl -u fail:fail -H 'Host: test-htpasswd.local' http://127.0.0.1/hello" + command: "curl -u fail:fail -H 'Host: test-htpasswd.local' http://127.0.0.1/hello/" changed_when: false register: authfail failed_when: authfail.stdout.find('401 Authorization Required') == -1 - name: -- VERIFY AUTH BASIC OK -- - command: "curl -u hanx:qwerty -H 'Host: test-htpasswd.local' http://127.0.0.1/hello" + command: "curl -u hanx:qwerty -H 'Host: test-htpasswd.local' http://127.0.0.1/hello/" changed_when: false register: authok failed_when: authok.stdout.find('hello') == -1