From 9571470f5045caeca4f94d1855cfda9cc7e817aa Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Tue, 8 Mar 2016 16:24:43 -0500 Subject: [PATCH] Bug 16008: noisy "fatal" warning when new file is moved in another patch The failure was tracked down to check_forbidden_patterns in QohA/File.pm's check_forbidden_patterns function. As there can't be any forbidden patterns on a non-existent file, this patch returns the default 1 when the file being checked does not exist. TEST PLAN --------- apply bug 15870 to your koha run qa test tools -- see the warning apply this patch to your qa test tools run qa test tools -- no more warning --- QohA/File.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/QohA/File.pm b/QohA/File.pm index bd217f7..c80544b 100644 --- a/QohA/File.pm +++ b/QohA/File.pm @@ -46,6 +46,9 @@ sub check_forbidden_patterns { # For the first pass, I don't want to launch any test. return 1 if $self->pass == 0; + # Patches may create and move files. + return 1 unless (-e $self->path); + my $git = QohA::Git->new(); my $diff_log = $git->diff_log($cnt, $self->path); my @forbidden_patterns = @$patterns; -- 2.1.4