Main Koha release repository https://koha-community.org
Find a file
Tomas Cohen Arazi c0adb88d0a Bug 15152: t/db_dependent/Reports_Guided.t should not depend on existing data
The current implementation relies on existing borrowers on the DB.
Even when the DB itself doesn't have a FK constraint, the function
that retrieves the reports from the DB relies on get_saved_reports_base_query
which creates a query that JOINs the full query with the 'borrowers' table, on
the borrowernumber. So it is doomed to fail on some scenarios.
Specially because the current tests expect specific borrowernumber values
to be present (1, 2 and 3).

To test:
[To set the failure scenario]
 $ vagrant up jessie
 $ vagrant ssh jessie
 $ wget https://theke.io/static/reports_guided_sequence.txt -O /vagrant/reports_guided_sequence.txt
 $ wget https://theke.io/static/koha_3_20_00.sql.gz -O /vagrant/koha_3_20_00.sql.gz
 $ sudo -s
 $ mysql
 > DROP DATABASE koha_kohadev; CREATE DATABASE koha_kohadev; \q
 $ zcat /vagrant/koha_3_20_00.sql.gz | mysql koha_kohadev
 $ exit
 $ sudo koha-shell kohadev
 $ cd kohaclone
 $ cat /vagrant/reports_guided_sequence.txt | xargs prove

- now run the tests:
 $ prove t/db_dependent/Reports_Guided.t
=> FAIL: The tests fail

- Apply the patch
- [re create the scenario]
- Run the test:
  $ prove t/db_dependent/Reports_Guided.t
=> SUCCESS: Tests now pass
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-16 15:55:22 -03:00
acqui Bug 15117: Transfer Order: Better user information and translation handling 2015-11-06 12:03:58 -03:00
admin Bug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor* 2015-11-05 10:57:41 -03:00
api/v1 Bug 13799: Add types for patron's fields in Swagger spec 2015-11-04 13:47:33 -03:00
authorities Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax 2015-11-02 12:49:13 -03:00
basket Bug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page 2015-11-05 09:58:02 -03:00
C4 Bug 14078: (followup) converting from ISO5426 is not complete 2015-11-16 12:48:44 -03:00
catalogue Bug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page 2015-11-05 09:58:02 -03:00
cataloguing Bug 8064: Merge several biblios 2015-11-09 15:08:57 -03:00
circ Bug 11431: Add additional sound options 2015-11-04 12:32:57 -03:00
course_reserves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
debian Bug 13799: (PM followup) Dependency updates 2015-11-11 15:49:23 -03:00
docs Bug 7143: Updates for the 3.22 release 2015-11-10 11:01:07 -03:00
errors
etc Bug 14542: Transliterate rule for all single quote forms 2015-11-16 15:45:21 -03:00
install_misc Bug 14066: Removing more Readonly 2015-05-06 11:05:22 -03:00
installer Bug 15181: Rename marc21 fast add framework sql file 2015-11-16 12:34:31 -03:00
Koha Bug 15166: Carp if an invalid date is passed 2015-11-13 11:24:07 -03:00
koha-tmpl Bug 14544: Fix regression on sending an email from staff 2015-11-16 15:44:37 -03:00
labels Bug 15072: Breadcrumbs and titles inconsistent in Label creator 2015-10-30 09:57:22 -03:00
members Bug 14867: userid not generated when defined in BorrowerUnwantedField 2015-11-09 12:09:01 -03:00
misc Bug 15133: encode correctly email generated by runreport.pl 2015-11-16 15:53:57 -03:00
offline_circ Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
opac Bug 14553: Silencing warn triggered when clearing item rating on OPAC 2015-11-11 11:08:50 -03:00
OpenILS
patron_lists
patroncards Bug 14805: Allow the user to delete multiple batches 2015-11-04 11:13:31 -03:00
plugins Bug 14951: Remove C4::Dates from plugins/*.pl files 2015-10-06 10:29:42 -03:00
reports Bug 14735: Save cache_expiry on modifying a report 2015-11-10 15:20:48 -03:00
reserve Bug 12197: enforce the maxreserves preference when staff members place hold requests 2015-10-22 09:38:53 -03:00
reviews Bug 14779: Cannot paginate reviews 2015-09-07 11:38:26 -03:00
rotating_collections Bug 15066: Make transfer rotating collection works under Plack 2015-11-05 09:50:09 -03:00
selenium
serials Bug 8296: Follow up for QA 2015-11-05 10:41:28 -03:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
skel
sms
suggestion Bug 9468: use new SUGGEST_FORMAT list 2015-11-05 10:46:57 -03:00
svc Bug 14100: Better errors handling 2015-10-27 12:34:07 -03:00
t Bug 15152: t/db_dependent/Reports_Guided.t should not depend on existing data 2015-11-16 15:55:22 -03:00
tags Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax 2015-11-02 12:49:13 -03:00
test Bug 14321: Final cleanup, removing obsolete files 2015-09-25 12:02:52 -03:00
tmp/modified_authorities
tools Bug 14795: Prevent modifying a record without using the original framework 2015-11-16 12:35:08 -03:00
virtualshelves Bug 15137: Display ISBN and author info when sending list by email 2015-11-16 12:36:01 -03:00
xt Bug 13632: (QA followup) remove xt/permissions.t 2015-10-19 12:42:59 -03:00
.editorconfig
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap (RM followup) .mailmap updates 2015-05-22 17:02:21 -03:00
about.pl Bug 7895: Test for PSGI-related env to report in about.pl 2015-11-10 15:18:28 -03:00
changelanguage.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
edithelp.pl Bug 14813: Fix encoding issues on editing help pages 2015-09-16 10:42:15 -03:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 14812: Display the help in the correct language 2015-10-02 15:06:08 -03:00
INSTALL Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL.debian Bug 8092 follow-up: Add optional dependency on CHI 2012-06-09 13:08:18 +02:00
INSTALL.fedora7 Bug 9809: Remove one more occurrence of reserveconstraints 2015-08-26 10:27:01 -03:00
INSTALL.opensuse
INSTALL.ubuntu
Koha.pm Koha 3.22 beta 2015-11-12 10:11:56 -03:00
koha_perl_deps.pl
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
mainpage.pl Bug 10904: (QA followup) Use branch limit if either IndependentBranches or IndependentBranchesPatronModifications is enabled 2015-11-02 12:34:46 -03:00
Makefile.PL Bug 13758: (QA followup) Make Makefile.PL aware of Koha.pm 2015-05-07 11:42:12 -03:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.robots
rewrite-config.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/