Bugzilla – Attachment 134913 Details for
Bug 30731
Noise from about script coming from Test::MockTime (or other CPAN modules)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30731: Unit tests
Bug-30731-Unit-tests.patch (text/plain), 2.83 KB, created by
Marcel de Rooy
on 2022-05-12 07:11:17 UTC
(
hide
)
Description:
Bug 30731: Unit tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-05-12 07:11:17 UTC
Size:
2.83 KB
patch
obsolete
>From 4d422871ae1de5131172888bb8b465116e44464c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 11 May 2022 14:35:18 +0000 >Subject: [PATCH] Bug 30731: Unit tests >Content-Type: text/plain; charset=utf-8 > >Installer_pm.t can safely be discarded, having Installer_PerlModules.t. > >Note: Without the second patch, the test about versions_info being silent >might fail. With the second patch, it should pass. >Note that since the order of requiring the cpan modules varies (without >the second patch), the results (potential warnings) vary too. > >Test plan: >Run t/Installer_PerlModules.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/Installer_PerlModules.t | 21 ++++++++++++--------- > t/Installer_pm.t | 15 --------------- > 2 files changed, 12 insertions(+), 24 deletions(-) > delete mode 100755 t/Installer_pm.t > >diff --git a/t/Installer_PerlModules.t b/t/Installer_PerlModules.t >index 61d9bc22f5..0a81da024d 100755 >--- a/t/Installer_PerlModules.t >+++ b/t/Installer_PerlModules.t >@@ -5,23 +5,26 @@ > > use Modern::Perl; > >-use Test::More tests => 6; >+use Test::More tests => 3; >+use Test::Warn; > > BEGIN { > use_ok('C4::Installer::PerlModules'); > } > >-my $modules; >-ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); >-my $prereq_pm = $modules->prereq_pm(); >-ok (exists($prereq_pm->{"DBI"}), 'DBI required for installer to run'); >-ok (exists($prereq_pm->{"CGI"}), 'CGI required for installer to run' ); >-ok (exists($prereq_pm->{"YAML::XS"}), 'YAML::XS required for installer to run'); >+subtest 'prereq_pm' => sub { >+ my $modules; >+ ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); >+ my $prereq_pm = $modules->prereq_pm(); >+ ok (exists($prereq_pm->{"DBI"}), 'DBI required for installer to run'); >+ ok (exists($prereq_pm->{"CGI"}), 'CGI required for installer to run' ); >+ ok (exists($prereq_pm->{"YAML::XS"}), 'YAML::XS required for installer to run'); >+}; > > subtest 'versions_info' => sub { >- plan tests => 4; >+ plan tests => 5; > my $modules = C4::Installer::PerlModules->new; >- $modules->versions_info; >+ warning_is { $modules->versions_info } undef, 'No warnings from versions_info'; > ok( exists $modules->{missing_pm}, 'versions_info fills the missing_pm key' ); > ok( exists $modules->{upgrade_pm}, 'versions_info fills the upgrade_pm key' ); > ok( exists $modules->{current_pm}, 'versions_info fills the current_pm key' ); >diff --git a/t/Installer_pm.t b/t/Installer_pm.t >deleted file mode 100755 >index 0ed28ee0e5..0000000000 >--- a/t/Installer_pm.t >+++ /dev/null >@@ -1,15 +0,0 @@ >-#!/usr/bin/perl >-# >-use strict; >-use warnings; >- >-use Test::More tests => 2; >-use Data::Dumper; >- >-BEGIN { >- use_ok('C4::Installer::PerlModules'); >-} >- >-my $obj = C4::Installer::PerlModules->new; >- >-isa_ok($obj,'C4::Installer::PerlModules'); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30731
:
134913
|
134914
|
134915
|
134917
|
134918
|
134919
|
134960
|
134961
|
134962