Koha-clms/xt
Jonathan Druart 491ffdc7f1
Bug 40402: Make xt/find-license-problems.t process files that are in the git index
And only those files.

Currently the test is failing with
02:52:31 koha_1       | #   Failed test at xt/find-license-problems.t line 65.
02:52:31 koha_1       | #          got: '0'
02:52:31 koha_1       | #     expected: '1'
02:52:33 koha_1       | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0
02:52:33 koha_1       | # Looks like you failed 1 test of 1381.
02:52:33 koha_1       | [00:51:24] xt/find-license-problems.t

Because a LICENSE file has been added to koha-l10n, and now this test fails on it.

27ab9ff4d2

But we should not test files that are not part of the git index.

Test plan:
0. Do not apply this patch
1. Edit xt/find-license-problems.t, add
  warn scalar(@files);
2. Run `prove xt/find-license-problems.t`
=> Notice that 4056 files are processed
Note that you need to have a clean git repo. You can run the following
git command BUT BEWARE /*\ it will remove all changes not committed
  `git clean -d -f`
3. Apply this patch, prove again
=> Tests are passing, with the same number of tests
xt/find-license-problems.t .. ok
All tests successful.
Files=1, Tests=4056

Note that I think we lost one file, as Test::NoWarnings is adding a
test. But I don't think it is worth the trouble to find out which one is
missing.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-16 14:31:30 -06:00
..
author Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
api.t Bug 40179: Adjust tests 2025-07-08 15:42:08 -06:00
check_makefile.t Bug 39304: Make sure git commands return something 2025-04-22 08:46:25 +02:00
find-license-problems.t Bug 40402: Make xt/find-license-problems.t process files that are in the git index 2025-07-16 14:31:30 -06:00
find-misplaced-executables.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
find-missing-auth_checks.t Bug 24879: Exclude koha_perl_deps.pl 2024-04-03 17:05:51 +02:00
find-missing-csrf.t Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
find-missing-filters.t Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
find-missing-op-in-forms.t Bug 39876: Make find-missing-op-in-forms.t test TT files 2025-07-08 15:42:00 -06:00
js_tidy.t Bug 39115: Remove exclude list from js_tidy.t 2025-02-17 13:10:20 +01:00
perltidy.t Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
pl_valid.t Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
single_quotes.t Bug 39876: Apply module to other tests 2025-07-08 15:41:59 -06:00
tt_tidy.t Bug 39876: Get TT files for tt_tidy 2025-07-08 15:42:00 -06:00
verify-debian-docbook.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
verify-yarnlock.t Bug 37490: Add a test to detect when yarn.lock is not updated 2024-09-02 12:13:47 +02:00
verify_bib1.att.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
vue_tidy.t Bug 39119: Make js_tidy and vue_tidy test use the tidy script 2025-02-13 17:11:09 +01:00
yaml_valid.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
yaml_valid.t Bug 39319: Fixes for Pod::Checker 2025-04-14 08:51:21 +02:00