From 392a87cfa181a762bf4b3244aa3c6d065ef15253 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Sat, 21 Apr 2012 10:46:37 +0100 Subject: Added SSL cert verification for Bytemark Authentication. Also tidied away error messages generated during login tests in the web_interface. --- test/tc_mauve_web_interface.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/tc_mauve_web_interface.rb') diff --git a/test/tc_mauve_web_interface.rb b/test/tc_mauve_web_interface.rb index a120c37..69828e9 100644 --- a/test/tc_mauve_web_interface.rb +++ b/test/tc_mauve_web_interface.rb @@ -150,6 +150,12 @@ EOF assert(last_response.body.include?("Mauve: Login")) assert(session['__FLASH__'].has_key?(:error),"The flash error wasn't set") + # + # This last login attempt produces two warning messages (one for each auth + # type), so pop them both off the logger. + # + logger_pop ; logger_pop + post '/login', :username => 'test1', :password => 'ummVRu7qF' follow_redirect! while last_response.redirect? assert last_response.body.include?('Mauve: ') -- cgit v1.2.1 From 84b1abf30fe79032209cb0fcd0bfa9d6aaf37721 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Sat, 21 Apr 2012 13:37:12 +0100 Subject: Overhaul of authentication. * Added new configuration options: ** bytemark_calendar_url ** bytemark_auth_url ** remote_https_verify_mode ** remote_http_timeout ** failed_login_delay * Added authentication tests * Removed remote auth tests in from the web interface tests. * If no bytemark_auth_url is set, then no remote auth takes place. * SSL peer cert validation now takes place by default. * Removed old logic tests * Tidied the way tests take place a little. --- test/tc_mauve_web_interface.rb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'test/tc_mauve_web_interface.rb') diff --git a/test/tc_mauve_web_interface.rb b/test/tc_mauve_web_interface.rb index 69828e9..54c9697 100644 --- a/test/tc_mauve_web_interface.rb +++ b/test/tc_mauve_web_interface.rb @@ -53,12 +53,6 @@ class WebInterfaceTest < Mauve::UnitTest super setup_database - # - # BytemarkAuth test users are: - # - # test1: ummVRu7qF - # test2: POKvBqLT7 - # config =< 'test1', :password => 'ummVRu7qF' + post '/login', :username => 'test1', :password => 'goodpassword' follow_redirect! while last_response.redirect? assert last_response.body.include?('Mauve: ') + assert last_response.ok? get '/logout' follow_redirect! while last_response.redirect? @@ -166,7 +156,7 @@ EOF end def test_alerts_show_subject - post '/login', :username => 'test1', :password => 'ummVRu7qF' + post '/login', :username => 'test1', :password => 'goodpassword' follow_redirect! while last_response.redirect? assert last_response.body.include?('Mauve: ') -- cgit v1.2.1