Needs fix from bug 18806.
Created attachment 64299 [details] [review] Bug 18807: Fix tests www/batch.t Several things are wrong here: 1. It assumes that import_record_id is the biblionumber => Wrong, it is only true when the DB is empty and that the 2 AI equal 1 2. The encoding in the template is 'UTF-8', not 'utf8', it leaded to "stage-marc-import.pl: marc21record.mrc: Unexpected charset UTF-8, expecting utf8" 3. We did not test that the biblio was correctly imported Test plan: Make sure the tests now pass. For the www tests you need to set the following env vars: KOHA_USER, KOHA_PASS, KOHA_INTRANET_URL and KOHA_OPAC_URL
Block RM actions (cannot test before pushing stuffs).
Created attachment 64364 [details] [review] Bug 18807: t/db_dependent/www/batch.t fails get() does not take two parameters. fixed. prove and run koha qa test tools
Created attachment 64369 [details] [review] Bug 18807: Fix tests www/batch.t Several things are wrong here: 1. It assumes that import_record_id is the biblionumber => Wrong, it is only true when the DB is empty and that the 2 AI equal 1 2. The encoding in the template is 'UTF-8', not 'utf8', it leaded to "stage-marc-import.pl: marc21record.mrc: Unexpected charset UTF-8, expecting utf8" 3. We did not test that the biblio was correctly imported Test plan: Make sure the tests now pass. For the www tests you need to set the following env vars: KOHA_USER, KOHA_PASS, KOHA_INTRANET_URL and KOHA_OPAC_URL Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Created attachment 64370 [details] [review] Bug 18807: t/db_dependent/www/batch.t fails get() does not take two parameters. fixed. prove and run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Two questions: Should this work under https too? At this moment I run into Error GETing https:<etc>/cgi-bin/koha/tools/stage-marc-import.pl: Forbidden at t/db_dependent/www/batch.t line 69. Seeing reports of these errors with Mechanize and https when googling for it. $agent->content_contains( 'Details for ' . $bookdescription, [etc] You apparently assume here that the response is English from the staff client. Should you expect that? But note that it seems that the whole test is built on that assumption.. So just for the record.
(In reply to Marcel de Rooy from comment #7) > Two questions: > > Should this work under https too? At this moment I run into Error GETing > https:<etc>/cgi-bin/koha/tools/stage-marc-import.pl: Forbidden at > t/db_dependent/www/batch.t line 69. > Seeing reports of these errors with Mechanize and https when googling for it. > > $agent->content_contains( 'Details for ' . $bookdescription, [etc] > You apparently assume here that the response is English from the staff > client. Should you expect that? But note that it seems that the whole test > is built on that assumption.. So just for the record. Hi Marcel, this may be ignorance on my part as I'm still getting familiarized with what the test suite offers but are there other tests/instances where this happens? Or is can this be considered an outlying occurrence?
(In reply to Marcel de Rooy from comment #7) > Two questions: > > Should this work under https too? At this moment I run into Error GETing > https:<etc>/cgi-bin/koha/tools/stage-marc-import.pl: Forbidden at > t/db_dependent/www/batch.t line 69. > Seeing reports of these errors with Mechanize and https when googling for it. Out of the scope of this bug report anyway. I guess other www tests do not pass either? > $agent->content_contains( 'Details for ' . $bookdescription, [etc] > You apparently assume here that the response is English from the staff > client. Should you expect that? But note that it seems that the whole test > is built on that assumption.. So just for the record. Yes. Did you find another quick and easy solution? The goal here is to get www tests I can run before pushing. So let's fix them first, then improve them later.
(In reply to Jonathan Druart from comment #9) > Out of the scope of this bug report anyway. I guess other www tests do not > pass either? Only history.t passes. ok 4 - open tools module Error GETing https:[etc]/cgi-bin/koha/tools/stage-marc-import.pl: Forbidden at www/search_utf8.t line 127. Again stage marc import btw !?
Prior to applying this patch, batch.t fails for me. After applying it, all t/db_dependent/www/ tests pass for me on kohadevbox
Created attachment 64429 [details] [review] Bug 18807: Fix tests www/batch.t Several things are wrong here: 1. It assumes that import_record_id is the biblionumber => Wrong, it is only true when the DB is empty and that the 2 AI equal 1 2. The encoding in the template is 'UTF-8', not 'utf8', it leaded to "stage-marc-import.pl: marc21record.mrc: Unexpected charset UTF-8, expecting utf8" 3. We did not test that the biblio was correctly imported Test plan: Make sure the tests now pass. For the www tests you need to set the following env vars: KOHA_USER, KOHA_PASS, KOHA_INTRANET_URL and KOHA_OPAC_URL Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 64430 [details] [review] Bug 18807: t/db_dependent/www/batch.t fails get() does not take two parameters. fixed. prove and run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.02 Awesome job guys ;)
Tests fail for me with and without this patch: 1..26 ok 1 - connect to intranet ok 2 - login to staff client ok 3 - load main page ok 4 - open tools module Link not found at t/db_dependent/www/batch.t line 69. # Looks like your test exited with 255 just after 4.
(In reply to Katrin Fischer from comment #16) > Tests fail for me with and without this patch: master or 16.11.x?
Was testing with 16.11.x
(In reply to Katrin Fischer from comment #18) > Was testing with 16.11.x Tried just right now (HEAD is f5da355d4f2fc4435d1581afa0cbb462e9f389f0) and it works. Could you retry?
Tests all pass. These patches have been pushed to 16.11.x and will be in 16.11.10.
Pushed to 16.05.x, for 16.05.15 release