[Koha-bugs] [Bug 17934] Various issues with auth_values_input_www.t

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 18 19:30:56 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17934

--- Comment #1 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 59173
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59173&action=edit
Bug 17934: Make t/db_dependent/www/auth_values_input_www.t awesome

There were two lines of code which declared unused variables.
They were removed. Next, the issue of double planning encountered
on bug 17540
(https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17540#c3)
was encountered. So this corrects that and adds a little more
error handling into the whole C4::Context using process so that
perlcritic -4 is achieved.
Also typo on Korean in a comment.

TEST PLAN
---------
2) follow these commands:

$ mv C4/Context.pm C4/Context_backup.pm
$ sudo koha-shell -c "prove t/db_dependent/www/auth_values_input_www.t" kohadev
-- Nasty fail

$ mv C4/Context_backup.pm C4/Context.pm
$ sudo koha-shell -c "export PERL5LIB=\"\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
-- Nasty fail

$ sudo koha-shell -c "export KOHA_CONF=\"\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
-- Nasty fail

$ sudo koha-shell -c "export KOHA_INTRANET_URL=\"\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
$ sudo koha-shell -c "prove t/db_dependent/www/auth_values_input_www.t" kohadev
-- Nasty fail

$ sudo koha-shell -c "export KOHA_INTRANET_URL=\"http://localhost:8080/\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
-- This should work.

$ perlcritic -4 t/db_dependent/www/auth_values_input_www.t
-- This should fail

2) apply patch
3) follow these commands:

$ mv C4/Context.pm C4/Context_backup.pm
$ sudo koha-shell -c "prove t/db_dependent/www/auth_values_input_www.t" kohadev
-- This should trigger the C4::Context not working message

$ mv C4/Context_backup.pm C4/Context.pm
$ sudo koha-shell -c "export PERL5LIB=\"\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
-- This should trigger the C4::Contxt not loading message

$ sudo koha-shell -c "export KOHA_CONF=\"\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
-- This should trigger the KOHA_CONF not set message

$ sudo koha-shell -c "export KOHA_INTRANET_URL=\"\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
$ sudo koha-shell -c "prove t/db_dependent/www/auth_values_input_www.t" kohadev
-- These should both trigger the KOHA_INTRANET_URL not set message

$ sudo koha-shell -c "export KOHA_INTRANET_URL=\"http://localhost:8080/\";prove
t/db_dependent/www/auth_values_input_www.t" kohadev
-- This should work.

$ perlcritic -4 t/db_dependent/www/auth_values_input_www.t
-- This should be OK
3) run koha qa test tools

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list