From: naoki i. <am...@us...> - 2008-04-17 15:13:07
|
Update of /cvsroot/popfile/engine/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6287/tests Modified Files: TestConfiguration.tst TestHTML.script TestPOP3.tst Log Message: Change Log 1. The session keys are now released when they are expired 2. New global parameter 'GLOBAL_session_timeout' (default : 1800 seconds) 3. Replaced get_administrator_session_key with get_single_user_session_key Classifier/Bayes.pm UI/HTML.pm POPFile/History.pm POPFile/Configuration.pm tests/TestConfiguration.tst The session keys which does not used in GLOBAL_session_timeout seconds will be released. NOTE : The session key for the administrator which got from get_administrator_session_key won't be expired. For this reason, please use get_single_user_session_key instead of get_administrator_session_key in the single user mode. NOTE : The 'last used time' is updated when valid_session_key__ is called with the session key. 4. Added 'Single User Mode Parameters' section in the Advanced tab UI/HTML.pm skins/default/advanced-page.thtml languages/English.msg languages/Nihongo.msg All POPFile parameters now can be changed in the single user mode. 'Single User Mode Parameters' section has been added below the 'Global POPFile Parameters' section. 5. Updated translation file languages/Nihongo.msg 6. The session cache is purged when the session key is released 7. The query is stopped when the session key is released UI/HTML.pm 8. Added escape_html_() function in HTTP.pm UI/HTTP.pm UI/HTML.pm tests/TestHTML.script This function is used for escaping ", <, >, &, ' characters. They are converted to ", <, >, & and ' 9. The matched header is showed/emphasized if the magnets are used UI/HTML.pm POPFile/History.pm Classifier/Bayes.pm tests/TestHTML.script The magnet icon's "title" will be like 'From:te...@ex...' in the history tab. The header information will be showed/emphasized in the single message view. 10. Minor fixes of the skins skins/default/common-bottom.thtml skins/default/users-page.thtml skins/default/administration-page.thtml skins/default/pop3-chain-panel.thtml skins/default/pop3-configuration-panel.thtml skins/default/socks-widget.thtml skins/default/nntp-configuration.thtml skins/default/smtp-configuration.thtml skins/default/windows-configuration.thtml Proxy/POP3.pm Proxy/NNTP.pm Proxy/SMTP.pm Platform/MSWin32.pm tests/TestPOP3.tst tests/TestHTML.tst Current state of the test suite: TestBayesScript PASS TestBayes PASS TestConfiguration PASS * TestHistory PASS TestHTML PASS * TestHTTP PASS TestIMAP PASS TestInsertScript PASS * TestLogger PASS TestMailParse PASS TestModule PASS TestMQ PASS TestMutex PASS TestPipeScript PASS TestPOP3 PASS TestProxy PASS TestWordMangle PASS TestXMLRPC PASS * : TODO : needs to add tests for multi user support Index: TestHTML.script =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTML.script,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** TestHTML.script 5 Apr 2008 16:50:46 -0000 1.36 --- TestHTML.script 17 Apr 2008 15:13:05 -0000 1.37 *************** *** 190,194 **** MATCH Magnetic Attraction for Ferrous Females MATCH personal ! MATCH <img title="foo" alt="foo" src="/skins/magnet.png"> GET /view?view=32&start_message=0 --- 190,194 ---- MATCH Magnetic Attraction for Ferrous Females MATCH personal ! MATCH <img title="From:foo" alt="From:foo" src="/skins/magnet.png"> GET /view?view=32&start_message=0 *************** *** 202,206 **** </font> <font size="+1"> ! foo </font> ENDMATCH --- 202,206 ---- </font> <font size="+1"> ! From:foo </font> ENDMATCH *************** *** 602,611 **** SETINPUT type0 from SETSUBMIT bucket0 personal ! MATCH Magnet 'from: foo' already exists in bucket 'personal' SETINPUT text0 fo SETINPUT type0 from SETSUBMIT bucket0 personal ! MATCH New magnet 'from: fo' clashes with magnet 'from: foo' in bucket 'personal' and could cause ambiguous results. New magnet was not added. # Check magnet change value --- 602,611 ---- SETINPUT type0 from SETSUBMIT bucket0 personal ! MATCH Magnet 'from: foo' already exists in bucket 'personal' SETINPUT text0 fo SETINPUT type0 from SETSUBMIT bucket0 personal ! MATCH New magnet 'from: fo' clashes with magnet 'from: foo' in bucket 'personal' and could cause ambiguous results. New magnet was not added. # Check magnet change value *************** *** 807,819 **** # Check fork for POP3 ! HIDDEN 1 ! INPUTIS pop3_force_fork 1 ! CONFIGIS pop3_force_fork 0 ! SETSUBMIT pop3_force_fork 0 ! INPUTIS pop3_force_fork 1 CONFIGIS pop3_force_fork 0 SETSUBMIT pop3_force_fork 1 ! INPUTIS pop3_force_fork 0 ! HIDDEN 0 # Check UI port --- 807,819 ---- # Check fork for POP3 ! #HIDDEN 1 ! INPUTIS pop3_force_fork CONFIGIS pop3_force_fork 0 SETSUBMIT pop3_force_fork 1 ! INPUTIS pop3_force_fork 1 ! CONFIGIS pop3_force_fork 1 ! SETSUBMIT pop3_force_fork off ! INPUTIS pop3_force_fork ! #HIDDEN 0 # Check UI port *************** *** 832,855 **** #HIDDEN 1 ! INPUTIS serveropt_pop3 ! CONFIGIS pop3_local 1 SETSUBMIT serveropt_pop3 on ! INPUTIS serveropt_pop3 on ! CONFIGIS pop3_local 0 SETSUBMIT serveropt_pop3 off ! INPUTIS serveropt_pop3 ! CONFIGIS pop3_local 1 #HIDDEN 0 # Check UI stealth #HIDDEN 1 ! INPUTIS serveropt_html ! CONFIGIS html_local 1 SETSUBMIT serveropt_html on ! INPUTIS serveropt_html on ! CONFIGIS html_local 0 SETSUBMIT serveropt_html off ! INPUTIS serveropt_html ! CONFIGIS html_local 1 #HIDDEN 0 --- 832,855 ---- #HIDDEN 1 ! INPUTIS serveropt_pop3 ! CONFIGIS pop3_local 1 SETSUBMIT serveropt_pop3 on ! INPUTIS serveropt_pop3 on ! CONFIGIS pop3_local 0 SETSUBMIT serveropt_pop3 off ! INPUTIS serveropt_pop3 ! CONFIGIS pop3_local 1 #HIDDEN 0 # Check UI stealth #HIDDEN 1 ! INPUTIS serveropt_html ! CONFIGIS html_local 1 SETSUBMIT serveropt_html on ! INPUTIS serveropt_html on ! CONFIGIS html_local 0 SETSUBMIT serveropt_html off ! INPUTIS serveropt_html ! CONFIGIS html_local 1 #HIDDEN 0 *************** *** 877,887 **** #HIDDEN 1 ! INPUTIS update_check USERCONFIGIS html_update_check 0 ! SETSUBMIT update_check on ! INPUTIS update_check on USERCONFIGIS html_update_check 1 ! SETSUBMIT update_check off ! INPUTIS update_check USERCONFIGIS html_update_check 0 #HIDDEN 0 --- 877,887 ---- #HIDDEN 1 ! INPUTIS update_check USERCONFIGIS html_update_check 0 ! SETSUBMIT update_check on ! INPUTIS update_check on USERCONFIGIS html_update_check 1 ! SETSUBMIT update_check off ! INPUTIS update_check USERCONFIGIS html_update_check 0 #HIDDEN 0 *************** *** 890,900 **** #HIDDEN 1 ! INPUTIS send_stats USERCONFIGIS html_send_stats 0 ! SETSUBMIT send_stats on ! INPUTIS send_stats on USERCONFIGIS html_send_stats 1 ! SETSUBMIT send_stats off ! INPUTIS send_stats USERCONFIGIS html_send_stats 0 #HIDDEN 0 --- 890,900 ---- #HIDDEN 1 ! INPUTIS send_stats USERCONFIGIS html_send_stats 0 ! SETSUBMIT send_stats on ! INPUTIS send_stats on USERCONFIGIS html_send_stats 1 ! SETSUBMIT send_stats off ! INPUTIS send_stats USERCONFIGIS html_send_stats 0 #HIDDEN 0 *************** *** 905,912 **** GET /history ISVALIDPASSWORD ! SETINPUT new_password secret ! SETSUBMIT confirm_password secret ISVALIDPASSWORD secret ! SETSUBMIT old_password secret ISVALIDPASSWORD --- 905,912 ---- GET /history ISVALIDPASSWORD ! SETINPUT new_password secret ! SETSUBMIT confirm_password secret ISVALIDPASSWORD secret ! SETSUBMIT old_password secret ISVALIDPASSWORD *************** *** 923,929 **** # Check add ignore word ! INPUTIS newword SETSUBMIT newword four11@.-_ ! MATCH 'four11@.-_' added to the Ignored Words list # reload GET /advanced --- 923,929 ---- # Check add ignore word ! INPUTIS newword SETSUBMIT newword four11@.-_ ! MATCH 'four11@.-_' added to the Ignored Words list # reload GET /advanced *************** *** 934,943 **** # Check remove ignore word ! INPUTIS word SETSUBMIT word four11@.-_ ! MATCH 'four11@.-_' removed from the Ignored Words list # reload GET /advanced ! NOTMATCH four11@.-_ SETSUBMIT word ba"d MATCH Ignored words can only contain alphanumeric, ., _, -, or @ characters --- 934,943 ---- # Check remove ignore word ! INPUTIS word SETSUBMIT word four11@.-_ ! MATCH 'four11@.-_' removed from the Ignored Words list # reload GET /advanced ! NOTMATCH four11@.-_ SETSUBMIT word ba"d MATCH Ignored words can only contain alphanumeric, ., _, -, or @ characters *************** *** 967,972 **** GET /advanced SETSUBMIT parameter_bayes_hostname testhostname ! CONFIGIS bayes_hostname testhostname ! INPUTIS parameter_bayes_hostname testhostname # Buckets Page --- 967,972 ---- GET /advanced SETSUBMIT parameter_bayes_hostname testhostname ! CONFIGIS bayes_hostname testhostname ! INPUTIS parameter_bayes_hostname testhostname # Buckets Page Index: TestPOP3.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestPOP3.tst,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** TestPOP3.tst 9 Apr 2008 17:20:48 -0000 1.35 --- TestPOP3.tst 17 Apr 2008 15:13:05 -0000 1.36 *************** *** 181,187 **** $params = $templ->{params__}; test_assert_equal( scalar( keys( %{$params} ) ), 3 ); ! test_assert_equal( $templ->param( 'POP3_Configuration_If_Force_Fork' ), !$p->config_( 'force_fork' ) ); ! test_assert_equal( $templ->param( 'POP3_Configuration_Port' ), $p->config_( 'port' ) ); ! test_assert_equal( $templ->param( 'POP3_Configuration_Separator' ), $p->config_( 'separator' ) ); delete $templ->{params__}; --- 181,187 ---- $params = $templ->{params__}; test_assert_equal( scalar( keys( %{$params} ) ), 3 ); ! test_assert_equal( $templ->param( 'POP3_Configuration_If_Force_Fork' ), ( $p->config_( 'force_fork' ) == 1 ) ); ! test_assert_equal( $templ->param( 'POP3_Configuration_Port' ), $p->config_( 'port' ) ); ! test_assert_equal( $templ->param( 'POP3_Configuration_Separator' ), $p->config_( 'separator' ) ); delete $templ->{params__}; *************** *** 303,307 **** delete $form->{pop3_separator}; ! test_assert_equal( $p->config_( 'force_fork' ), 0); $form->{pop3_force_fork} = 1; --- 303,308 ---- delete $form->{pop3_separator}; ! test_assert_equal( $p->config_( 'force_fork' ), 0 ); ! $form->{update_pop3_configuration} = 1; $form->{pop3_force_fork} = 1; *************** *** 319,322 **** --- 320,324 ---- delete $form->{pop3_force_fork}; + delete $form->{update_pop3_configuration}; $p->config_( 'force_fork', 0 ); *************** *** 373,377 **** $old_config_value = $p->config_( 'secure_ssl' ); ! $form->{sssl} = "UseSSL"; $language->{Security_SecureServerUseSSLOn} = "use SSL connections"; $language->{Security_SecureServerUseSSLOff} = "not use SSL connections"; --- 375,380 ---- $old_config_value = $p->config_( 'secure_ssl' ); ! $form->{update_server} = 1; ! $form->{sssl} = "1"; $language->{Security_SecureServerUseSSLOn} = "use SSL connections"; $language->{Security_SecureServerUseSSLOff} = "not use SSL connections"; *************** *** 390,393 **** --- 393,397 ---- delete $form->{server}; + delete $form->{update_server}; $p->config_('secure_ssl', $old_config_value ); Index: TestConfiguration.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestConfiguration.tst,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** TestConfiguration.tst 13 Apr 2008 03:08:09 -0000 1.25 --- TestConfiguration.tst 17 Apr 2008 15:13:05 -0000 1.26 *************** *** 133,136 **** --- 133,138 ---- test_assert_regexp( $line, 'GLOBAL_random_module Crypt::OpenSSL::Random' ); $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_session_timeout 1800' ); + $line = <FILE>; test_assert_regexp( $line, 'GLOBAL_single_user 1' ); $line = <FILE>; |