Bug 40379 - t/db_dependent/www tests generate warnings
Summary: t/db_dependent/www tests generate warnings
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 40444
  Show dependency treegraph
 
Reported: 2025-07-15 10:44 UTC by Jonathan Druart
Modified: 2025-08-29 21:56 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.02
Circulation function:


Attachments
Bug 40379: Remove warnings from t/db_dependent/www (5.32 KB, patch)
2025-07-15 10:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40379: Remove warnings from t/db_dependent/www (5.37 KB, patch)
2025-07-18 07:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 40379: Remove warnings from t/db_dependent/www (5.46 KB, patch)
2025-07-21 07:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-07-15 10:44:44 UTC
03:17:21 koha_1       | Warning: <retrieval> element has non-unique value in 'name' key attribute: F at t/db_dependent/www/auth_values_input_www.t line 36.
03:17:21 koha_1       | Warning: <retrieval> element has non-unique value in 'name' key attribute: B at t/db_dependent/www/auth_values_input_www.t line 36.
Comment 1 Jonathan Druart 2025-07-15 10:50:18 UTC
Created attachment 184081 [details] [review]
Bug 40379: Remove warnings from t/db_dependent/www

XMLin complains because there are several nodes with the same name
attribute. Not sure what is correct or not, but we actually cannot use
the admin/DBMS user to login to the Koha interface.

We use KOHA_USER env var or default to 'koha'.
Comment 2 David Nind 2025-07-18 07:02:47 UTC
Created attachment 184282 [details] [review]
Bug 40379: Remove warnings from t/db_dependent/www

XMLin complains because there are several nodes with the same name
attribute. Not sure what is correct or not, but we actually cannot use
the admin/DBMS user to login to the Koha interface.

We use KOHA_USER env var or default to 'koha'.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2025-07-18 09:18:12 UTC
 t/db_dependent/www/batch.t
1..25
ok 1 - connect to intranet
ok 2 - login to staff interface
ok 3 - load main page
Link not found at /usr/share/koha/t/lib/Mocks/Zebra.pm line 171.
ok 4 - no warnings
# Looks like your test exited with 255 just after 4.
Comment 4 Marcel de Rooy 2025-07-18 09:20:04 UTC
    $agent->follow_link_ok( { url_regex => qr/cataloging-home/i }, 'open caaloging module' );

Whats happening here?
Comment 5 Jonathan Druart 2025-07-18 10:25:50 UTC
(In reply to Marcel de Rooy from comment #3)
>  t/db_dependent/www/batch.t
> 1..25
> ok 1 - connect to intranet
> ok 2 - login to staff interface
> ok 3 - load main page
> Link not found at /usr/share/koha/t/lib/Mocks/Zebra.pm line 171.
> ok 4 - no warnings
> # Looks like your test exited with 255 just after 4.

It's passing for me.

(In reply to Marcel de Rooy from comment #4)
>     $agent->follow_link_ok( { url_regex => qr/cataloging-home/i }, 'open
> caaloging module' );
> 
> Whats happening here?

The test is hitting the mainpage then search for the "Cataloging" link (you should see /cgi-bin/koha/cataloguing/cataloging-home.pl)

What about the other tests? Maybe it's a problem with the changes made here, and the credentials used by the tests to connect to the interface.
Comment 6 Marcel de Rooy 2025-07-21 07:25:32 UTC
(In reply to Jonathan Druart from comment #5)
> (In reply to Marcel de Rooy from comment #3)
> >  t/db_dependent/www/batch.t
> > 1..25
> > ok 1 - connect to intranet
> > ok 2 - login to staff interface
> > ok 3 - load main page
> > Link not found at /usr/share/koha/t/lib/Mocks/Zebra.pm line 171.
> > ok 4 - no warnings
> > # Looks like your test exited with 255 just after 4.
> 
> It's passing for me.
> 
> (In reply to Marcel de Rooy from comment #4)
> >     $agent->follow_link_ok( { url_regex => qr/cataloging-home/i }, 'open
> > caaloging module' );
> > 
> > Whats happening here?
> 
> The test is hitting the mainpage then search for the "Cataloging" link (you
> should see /cgi-bin/koha/cataloguing/cataloging-home.pl)
> 
> What about the other tests? Maybe it's a problem with the changes made here,
> and the credentials used by the tests to connect to the interface.

I am having issues with batch.t and search_utf8.t. The other ones are fine. Still looking..
Comment 7 Marcel de Rooy 2025-07-21 07:51:57 UTC
Created attachment 184423 [details] [review]
Bug 40379: Remove warnings from t/db_dependent/www

XMLin complains because there are several nodes with the same name
attribute. Not sure what is correct or not, but we actually cannot use
the admin/DBMS user to login to the Koha interface.

We use KOHA_USER env var or default to 'koha'.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2025-07-21 07:53:11 UTC
(In reply to Marcel de Rooy from comment #6)
> I am having issues with batch.t and search_utf8.t. The other ones are fine.
> Still looking..

Passing QA. My issues are related to my setup and security. Code looks fine to me, the other ones pass.
Comment 9 Lucas Gass (lukeg) 2025-07-21 20:03:47 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 10 Paul Derscheid 2025-07-24 19:03:44 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 11 Fridolin Somers 2025-08-01 13:41:28 UTC
Does not apply easy on 24.11.x, lets not backport
Comment 12 David Nind 2025-08-29 21:56:03 UTC
Test suite, no changes to the manual required.