From ab5672e5c53a0b735b64f59fd7f060f787a7e91c Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 5 Sep 2016 09:09:16 -0700 Subject: [PATCH] create_config now calls BAIL_OUT on its own --- t/06_mail_handling.t | 9 ++------- t/07_bugreport.t | 9 ++------- t/07_control_limit.t | 9 ++------- t/08_pkgreport.t | 9 ++------- t/09_soap.t | 9 ++------- t/10_expire.t | 9 ++------- t/11_blocks.t | 9 ++------- t/12_merge.t | 9 ++------- t/13_utf8_mail.t | 9 ++------- t/14_control_at_submit.t | 9 ++------- t/15_rebuild_indexdb.t | 9 ++------- 11 files changed, 22 insertions(+), 77 deletions(-) diff --git a/t/06_mail_handling.t b/t/06_mail_handling.t index f0b2b37..0e42ed0 100644 --- a/t/06_mail_handling.t +++ b/t/06_mail_handling.t @@ -26,13 +26,8 @@ use Encode qw(decode encode); # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/07_bugreport.t b/t/07_bugreport.t index c1438c2..dfc1650 100644 --- a/t/07_bugreport.t +++ b/t/07_bugreport.t @@ -24,13 +24,8 @@ use HTTP::Status qw(RC_NOT_MODIFIED); use lib qw(t/lib); use DebbugsTest qw(:all); -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + # create a bug send_message(to=>'submit@bugs.something', diff --git a/t/07_control_limit.t b/t/07_control_limit.t index 1283223..ae3e98a 100644 --- a/t/07_control_limit.t +++ b/t/07_control_limit.t @@ -24,13 +24,8 @@ use Data::Dumper; # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/08_pkgreport.t b/t/08_pkgreport.t index 97f331f..745e35d 100644 --- a/t/08_pkgreport.t +++ b/t/08_pkgreport.t @@ -23,13 +23,8 @@ use Test::WWW::Mechanize; use lib qw(t/lib); use DebbugsTest qw(:all); -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + # create a bug send_message(to=>'submit@bugs.something', diff --git a/t/09_soap.t b/t/09_soap.t index ccd51ed..266c4c5 100644 --- a/t/09_soap.t +++ b/t/09_soap.t @@ -17,13 +17,8 @@ use lib qw(t/lib); use DebbugsTest qw(:configuration); use Cwd; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + # create a bug send_message(to=>'submit@bugs.something', diff --git a/t/10_expire.t b/t/10_expire.t index fef4094..311b9b3 100644 --- a/t/10_expire.t +++ b/t/10_expire.t @@ -25,13 +25,8 @@ use Data::Dumper; # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/11_blocks.t b/t/11_blocks.t index 5e277cd..72f7c35 100644 --- a/t/11_blocks.t +++ b/t/11_blocks.t @@ -25,13 +25,8 @@ use Test::WWW::Mechanize; # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/12_merge.t b/t/12_merge.t index 4857f14..c654359 100644 --- a/t/12_merge.t +++ b/t/12_merge.t @@ -24,13 +24,8 @@ use Data::Dumper; # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/13_utf8_mail.t b/t/13_utf8_mail.t index 8fb49e4..b98154e 100644 --- a/t/13_utf8_mail.t +++ b/t/13_utf8_mail.t @@ -28,13 +28,8 @@ use Encode qw(decode encode decode_utf8 encode_utf8); # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/14_control_at_submit.t b/t/14_control_at_submit.t index 41c6a03..950d1a9 100644 --- a/t/14_control_at_submit.t +++ b/t/14_control_at_submit.t @@ -26,13 +26,8 @@ use Encode qw(decode encode); # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; diff --git a/t/15_rebuild_indexdb.t b/t/15_rebuild_indexdb.t index 85d7681..6f6aa21 100644 --- a/t/15_rebuild_indexdb.t +++ b/t/15_rebuild_indexdb.t @@ -27,13 +27,8 @@ use Encode qw(decode encode decode_utf8 encode_utf8); # HTTP::Server:::Simple defines a SIG{CHLD} handler that breaks system; undef it here. $SIG{CHLD} = sub {}; -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + my $sendmail_dir = $config{sendmail_dir}; my $spool_dir = $config{spool_dir}; -- 2.39.2