Commit Graph

9 Commits

Author SHA1 Message Date
Martin Renvoize ad5fe0adff
Bug 42714: (QA follow-up) Add tests for cronlogaction and Koha::Script logging
t/db_dependent/Log.t
- Add subtest verifying cronlogaction() prefixes loginfo with \$0
  (the running script path), appends the info parameter, defaults the
  action to 'Run', and respects custom action values.

t/Koha/Script.t
- Assert that \$Koha::Script::_cron is false when the module is loaded
  without the -cron flag, confirming INIT/END blocks will not log.

t/Koha/Script_cron.t
- Assert that \$Koha::Script::_cron is true when the module is loaded
  with the -cron flag, confirming INIT/END blocks will log.

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-28 14:32:39 +00:00
Jonathan Druart 67e2f80e85
Bug 40943: Fix Script_cron.t
Failed with:
   at t/Koha/Script_cron.t line 28.
     Structures begin differing at:
          $got->{session_id} = undef
     $expected->{session_id} = Does not exist

session_id is now part of userenv

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-04 07:15:11 -07:00
Tomás Cohen Arazi 6b478e0da9
Bug 40163: (follow-up) Fix wrong GNU links and update test
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-24 09:25:04 -06:00
Jonathan Druart 5b69e6df98
Bug 38944: Add Test::NoWarnings to tests no producing warnings
This has been generated.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-13 17:25:03 +01:00
Jonathan Druart 47047348ba Bug 24786: Fix Script_cron.t and t/Koha/Script.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 17:04:31 +01:00
Jonathan Druart f1f9c6dc74 Bug 26384: Fix executable flags
.pm must not have -x
.t must have -x
.pl must have -x

Test plan:
Apply only the first patch, run the tests and confirm that the failures
make sense
Apply this patch and confirm that the test now returns green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-11 09:56:56 +02:00
Jonathan Druart 233e3efba3 Bug 24201: fix failing tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-10 09:58:32 +02:00
Martin Renvoize 9f362876f4
Bug 17845: Remove some missed references to branchprinter
Remove a few last references to branchprinter, mostly from tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-10 15:18:28 +00:00
Martin Renvoize d2e189ca1c Bug 22600: Set 'commandline' interface appropriately
This patch change Koha::Cron to be a more generic Koha::Script class and
update all commanline driven scripts to use it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-10 19:43:11 +00:00