[Rt-commit] [rtir] 07/07: fix test warnings of "RT::Test::Web object needs to be destroyed before done_testing is called"

? sunnavy sunnavy at bestpractical.com
Fri Oct 16 14:08:25 EDT 2015


This is an automated email from the git hooks/post-receive script.

sunnavy pushed a commit to branch 3.4/rt-4.4-compat
in repository rtir.

commit a8364a75238b573f849d33c0cad2ef53159d6869
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Oct 17 01:52:32 2015 +0800

    fix test warnings of "RT::Test::Web object needs to be destroyed before done_testing is called"
---
 t/001-basic-RTIR.t                             | 1 +
 t/002-test-reject.t                            | 1 +
 t/003-resolve-IR-when-all-incidents-resolved.t | 1 +
 t/005-resolve-investigations.t                 | 1 +
 t/006-saved-searches.t                         | 1 +
 t/009-attachments-processing.t                 | 1 +
 t/010-bulk-reject.t                            | 1 +
 t/011-merge.t                                  | 1 +
 t/015-make-clicky.t                            | 1 +
 t/019-watchers-on-create.t                     | 1 +
 t/020-incident-and-investigation.t             | 1 +
 t/030-redirect-on-login.t                      | 1 +
 t/articles/basics.t                            | 1 +
 t/articles/on-create.t                         | 1 +
 t/articles/on-update.t                         | 1 +
 t/block/pending-no-regexp.t                    | 1 +
 t/block/pending-regexp.t                       | 1 +
 t/block/status-basics.t                        | 1 +
 t/block/status-editor-regression.t             | 1 +
 t/constituency/basics.t                        | 1 +
 t/constituency/email.t                         | 1 +
 t/constituency/email_outgoing.t                | 1 +
 t/constituency/propagation-inherit.t           | 1 +
 t/constituency/propagation-no.t                | 1 +
 t/constituency/propagation-reject.t            | 1 +
 t/custom-fields/defaults-config.t              | 1 +
 t/custom-fields/defaults-on-linking.t          | 1 +
 t/custom-fields/ip.t                           | 1 +
 t/custom-fields/ipv6.t                         | 1 +
 t/custom-fields/on-transactions.t              | 1 +
 t/dates/started.t                              | 1 +
 t/gnupg/on-create.t                            | 1 +
 t/gnupg/on-incident.t                          | 1 +
 t/gnupg/on-update.t                            | 1 +
 t/incident/abandon.t                           | 1 +
 t/incident/bulk-abandon.t                      | 1 +
 t/incident/split.t                             | 1 +
 t/mail/skip_notification.t                     | 1 +
 t/report/status.t                              | 1 +
 t/searches/cf.t                                | 1 +
 t/searches/menu.t                              | 1 +
 t/searches/simple.t                            | 1 +
 t/tools/lookup.t                               | 1 +
 43 files changed, 43 insertions(+)

diff --git a/t/001-basic-RTIR.t b/t/001-basic-RTIR.t
index cb91c34..b45ac4e 100644
--- a/t/001-basic-RTIR.t
+++ b/t/001-basic-RTIR.t
@@ -42,4 +42,5 @@ $agent->LinkChildToIncident( $report, $second_incident_id);
 
 
 
+undef $agent;
 done_testing;
diff --git a/t/002-test-reject.t b/t/002-test-reject.t
index 2480d9a..eb7cd4d 100644
--- a/t/002-test-reject.t
+++ b/t/002-test-reject.t
@@ -169,4 +169,5 @@ diag "test that after bulk reject links to incidents are still there" if $ENV{'T
     $agent->has_tag('a', "$id", 'we have link to ticket');
 }
 
+undef $agent;
 done_testing;
diff --git a/t/003-resolve-IR-when-all-incidents-resolved.t b/t/003-resolve-IR-when-all-incidents-resolved.t
index 3a08f4e..1e09ab0 100644
--- a/t/003-resolve-IR-when-all-incidents-resolved.t
+++ b/t/003-resolve-IR-when-all-incidents-resolved.t
@@ -43,6 +43,7 @@ like(
 
 ir_status('resolved');
 
+undef $agent;
 done_testing;
 
 sub ir_status {
diff --git a/t/005-resolve-investigations.t b/t/005-resolve-investigations.t
index 83aa469..16f58dc 100644
--- a/t/005-resolve-investigations.t
+++ b/t/005-resolve-investigations.t
@@ -32,4 +32,5 @@ like($agent->content, qr/Status changed from \S*open\S* to \S*resolved\S*/, "sit
 $agent->follow_link_ok({text => "Re-open"}, "Followed 'open' link");
 like($agent->content, qr/Status changed from \S*resolved\S* to \S*open\S*/, "site says ticket got re-opened");
 
+undef $agent;
 done_testing;
diff --git a/t/006-saved-searches.t b/t/006-saved-searches.t
index bc1c596..d686396 100644
--- a/t/006-saved-searches.t
+++ b/t/006-saved-searches.t
@@ -66,4 +66,5 @@ is($agent->value('SavedSearchOwner'), "RT::Group-$DT_id", "privacy is correct");
 
 # ... should also do tests for the RTIR "refine" thing, which is like QB.
 
+undef $agent;
 done_testing;
diff --git a/t/009-attachments-processing.t b/t/009-attachments-processing.t
index 7ad44da..1d38144 100644
--- a/t/009-attachments-processing.t
+++ b/t/009-attachments-processing.t
@@ -237,4 +237,5 @@ $agent->goto_create_rtir_ticket('Blocks');
     unlink $filename or die "couldn't delete file '$filename': $!";
 }
 
+undef $agent;
 done_testing;
diff --git a/t/010-bulk-reject.t b/t/010-bulk-reject.t
index a58ea6c..4dcaecd 100644
--- a/t/010-bulk-reject.t
+++ b/t/010-bulk-reject.t
@@ -63,4 +63,5 @@ foreach( @irs ) {
     $agent->ticket_status_is( $_, 'rejected', "Ticket #$_ is rejected" );
 }
 
+undef $agent;
 done_testing;
diff --git a/t/011-merge.t b/t/011-merge.t
index 1341e53..f3ce091 100644
--- a/t/011-merge.t
+++ b/t/011-merge.t
@@ -106,4 +106,5 @@ diag "merge two IRs that are linked to different Incidents" if $ENV{'TEST_VERBOS
     $agent->ticket_is_linked_to_inc( $ir1_id, [$inc1_id, $inc2_id] );
 }
 
+undef $agent;
 done_testing;
diff --git a/t/015-make-clicky.t b/t/015-make-clicky.t
index 6f9b398..c064fa9 100644
--- a/t/015-make-clicky.t
+++ b/t/015-make-clicky.t
@@ -120,5 +120,6 @@ diag "utf8 caching " if $ENV{'TEST_VERBOSE'};
 
 }
 
+undef $agent;
 done_testing;
 
diff --git a/t/019-watchers-on-create.t b/t/019-watchers-on-create.t
index 2016c8d..d347da8 100644
--- a/t/019-watchers-on-create.t
+++ b/t/019-watchers-on-create.t
@@ -86,4 +86,5 @@ SKIP: {
 	$agent->has_watchers( $solo_inv, 'AdminCc');
 }
 
+undef $agent;
 done_testing;
diff --git a/t/020-incident-and-investigation.t b/t/020-incident-and-investigation.t
index aa470bb..5684799 100755
--- a/t/020-incident-and-investigation.t
+++ b/t/020-incident-and-investigation.t
@@ -131,4 +131,5 @@ like( $agent->uri, qr/RTIR\/Create.html/, 'still in the create page' );
 $agent->content_contains('Creation failed', 'failed to create');
 $agent->content_contains('You must enter an Incident ID');
 
+undef $agent;
 done_testing;
diff --git a/t/030-redirect-on-login.t b/t/030-redirect-on-login.t
index 58eb47d..b50f3c5 100644
--- a/t/030-redirect-on-login.t
+++ b/t/030-redirect-on-login.t
@@ -106,6 +106,7 @@ for my $path (qw(Prefs/Other.html /Prefs/Other.html)) {
 
 
 
+undef $agent;
 done_testing;
 
 #TODO
diff --git a/t/articles/basics.t b/t/articles/basics.t
index 595fb09..90bfe35 100644
--- a/t/articles/basics.t
+++ b/t/articles/basics.t
@@ -40,4 +40,5 @@ $agent->display_ticket( $ir_id);
 $agent->follow_link_ok({text => $article_name}, "back to article");
 $agent->content_like( qr/this is a summary/, "found the summary of the article");
 
+undef $agent;
 done_testing();
diff --git a/t/articles/on-create.t b/t/articles/on-create.t
index abcd048..e1092d8 100644
--- a/t/articles/on-create.t
+++ b/t/articles/on-create.t
@@ -71,4 +71,5 @@ foreach ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks' ) {
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/articles/on-update.t b/t/articles/on-update.t
index d881cfe..a2dc340 100644
--- a/t/articles/on-update.t
+++ b/t/articles/on-update.t
@@ -76,4 +76,5 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks'
     like( $agent->field('UpdateContent'), qr/this is a content/ );
 }
 
+undef $agent;
 done_testing;
diff --git a/t/block/pending-no-regexp.t b/t/block/pending-no-regexp.t
index 317b8fa..d385b00 100644
--- a/t/block/pending-no-regexp.t
+++ b/t/block/pending-no-regexp.t
@@ -56,4 +56,5 @@ EOF
     $agent->ticket_status_is( $block_id, 'removed');
 }
 
+undef $agent;
 done_testing;
diff --git a/t/block/pending-regexp.t b/t/block/pending-regexp.t
index e78e93c..ef9c4ff 100644
--- a/t/block/pending-regexp.t
+++ b/t/block/pending-regexp.t
@@ -87,4 +87,5 @@ EOF
     $agent->ticket_status_is( $block_id, 'removed');
 }
 
+undef $agent;
 done_testing;
diff --git a/t/block/status-basics.t b/t/block/status-basics.t
index 1acae7a..12cfd15 100644
--- a/t/block/status-basics.t
+++ b/t/block/status-basics.t
@@ -102,4 +102,5 @@ diag "test activation after reply using Edit page";
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/block/status-editor-regression.t b/t/block/status-editor-regression.t
index fa219c9..e0137b9 100644
--- a/t/block/status-editor-regression.t
+++ b/t/block/status-editor-regression.t
@@ -15,4 +15,5 @@ $agent->goto_edit_block( $block);
 
 $agent->content_unlike(qr{<option (?:value=.*)?>Use system default\(\)</option>}, "The option 'Use system default()' does not exist.");
 
+undef $agent;
 done_testing();
diff --git a/t/constituency/basics.t b/t/constituency/basics.t
index 59c095d..c309df8 100644
--- a/t/constituency/basics.t
+++ b/t/constituency/basics.t
@@ -303,4 +303,5 @@ diag "check defaults when creating inc with inv";
     }
 }
 
+undef $agent;
 done_testing;
diff --git a/t/constituency/email.t b/t/constituency/email.t
index 1f599cb..49cd172 100644
--- a/t/constituency/email.t
+++ b/t/constituency/email.t
@@ -121,4 +121,5 @@ EOF
 
 
 
+undef $agent;
 done_testing;
diff --git a/t/constituency/email_outgoing.t b/t/constituency/email_outgoing.t
index 951bffd..353a7bb 100644
--- a/t/constituency/email_outgoing.t
+++ b/t/constituency/email_outgoing.t
@@ -159,4 +159,5 @@ diag "GOV user creates an IR under EDUNET, check addresses";
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/constituency/propagation-inherit.t b/t/constituency/propagation-inherit.t
index 8e18a1d..6256b49 100644
--- a/t/constituency/propagation-inherit.t
+++ b/t/constituency/propagation-inherit.t
@@ -275,4 +275,5 @@ diag "check that constituency propagates from a child to a parent after 'Edit',
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/constituency/propagation-no.t b/t/constituency/propagation-no.t
index 89d82f0..defba31 100644
--- a/t/constituency/propagation-no.t
+++ b/t/constituency/propagation-no.t
@@ -189,4 +189,5 @@ diag "create an incident under GOVNET and create a new IR "
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/constituency/propagation-reject.t b/t/constituency/propagation-reject.t
index 54bb227..d4605d7 100644
--- a/t/constituency/propagation-reject.t
+++ b/t/constituency/propagation-reject.t
@@ -306,4 +306,5 @@ diag "check that we can change constituency of an unlinked ticket using 'Edit' p
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/custom-fields/defaults-config.t b/t/custom-fields/defaults-config.t
index 2ea1626..3557bbe 100644
--- a/t/custom-fields/defaults-config.t
+++ b/t/custom-fields/defaults-config.t
@@ -81,4 +81,5 @@ my $agent = default_agent();
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/custom-fields/defaults-on-linking.t b/t/custom-fields/defaults-on-linking.t
index d6e23b6..c5fc932 100644
--- a/t/custom-fields/defaults-on-linking.t
+++ b/t/custom-fields/defaults-on-linking.t
@@ -75,4 +75,5 @@ my $agent = default_agent();
 
 
 
+undef $agent;
 done_testing;
diff --git a/t/custom-fields/ip.t b/t/custom-fields/ip.t
index 9914e77..82ad500 100644
--- a/t/custom-fields/ip.t
+++ b/t/custom-fields/ip.t
@@ -622,4 +622,5 @@ diag "merge ticket with the same IP";
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/custom-fields/ipv6.t b/t/custom-fields/ipv6.t
index 3478ce2..b5a2aad 100644
--- a/t/custom-fields/ipv6.t
+++ b/t/custom-fields/ipv6.t
@@ -550,4 +550,5 @@ diag "merge ticket with the same IP";
     is( $has[0], '0000:'x6 .'ac10:0001', "has value" );
 }
 
+undef $agent;
 done_testing();
diff --git a/t/custom-fields/on-transactions.t b/t/custom-fields/on-transactions.t
index cb2c233..1cc04dc 100644
--- a/t/custom-fields/on-transactions.t
+++ b/t/custom-fields/on-transactions.t
@@ -118,4 +118,5 @@ foreach my $id ( @tickets ) {
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/dates/started.t b/t/dates/started.t
index ff69bbb..376fa4b 100644
--- a/t/dates/started.t
+++ b/t/dates/started.t
@@ -110,4 +110,5 @@ diag "started date of a block" if $ENV{'TEST_VERBOSE'};
 }
 
 
+undef $agent;
 done_testing;
diff --git a/t/gnupg/on-create.t b/t/gnupg/on-create.t
index 01b640c..50160f7 100644
--- a/t/gnupg/on-create.t
+++ b/t/gnupg/on-create.t
@@ -244,6 +244,7 @@ diag "check encrypting of attachments";
     check_text_emails( { Encrypt => 1, Attachment => 1 }, @mail );
 }
 
+undef $agent;
 done_testing;
 
 sub check_text_emails {
diff --git a/t/gnupg/on-incident.t b/t/gnupg/on-incident.t
index 0b9ff35..3fde87d 100644
--- a/t/gnupg/on-incident.t
+++ b/t/gnupg/on-incident.t
@@ -86,4 +86,5 @@ diag "check that things don't work if there is no key";
     ok !@mail, 'there are no outgoing emails';
 }
 
+undef $agent;
 done_testing;
diff --git a/t/gnupg/on-update.t b/t/gnupg/on-update.t
index a70a3e1..fee59df 100644
--- a/t/gnupg/on-update.t
+++ b/t/gnupg/on-update.t
@@ -260,6 +260,7 @@ diag "check encrypting of attachments";
 }
 
 
+undef $agent;
 done_testing;
 
 sub check_text_emails {
diff --git a/t/incident/abandon.t b/t/incident/abandon.t
index 3182988..01b4d38 100644
--- a/t/incident/abandon.t
+++ b/t/incident/abandon.t
@@ -56,6 +56,7 @@ diag "abandon incident with resolved IR" if $ENV{'TEST_VERBOSE'};
     is $agent->ticket_status( $ir_id), 'resolved', 'resolved ir';
 }
 
+undef $agent;
 done_testing;
 
 
diff --git a/t/incident/bulk-abandon.t b/t/incident/bulk-abandon.t
index 1b0372b..bc61709 100644
--- a/t/incident/bulk-abandon.t
+++ b/t/incident/bulk-abandon.t
@@ -73,4 +73,5 @@ foreach my $id (@invests) {
     $agent->ticket_status_is( $id, 'resolved', 'correct status' );
 }
 
+undef $agent;
 done_testing;
diff --git a/t/incident/split.t b/t/incident/split.t
index f7ab38a..e6568c4 100644
--- a/t/incident/split.t
+++ b/t/incident/split.t
@@ -38,4 +38,5 @@ my $rtir_user = rtir_user();
     $agent->ticket_is_not_linked_to_inc( $inv_id, [$id]);
 }
 
+undef $agent;
 done_testing;
diff --git a/t/mail/skip_notification.t b/t/mail/skip_notification.t
index d279a50..8ac6119 100644
--- a/t/mail/skip_notification.t
+++ b/t/mail/skip_notification.t
@@ -61,4 +61,5 @@ diag "create an IR and check that 'SkipNotification' feature works";
     ok $recipient_ok, 'no emails to requestor';
 }
 
+undef $agent;
 done_testing;
diff --git a/t/report/status.t b/t/report/status.t
index d5dfa56..c69a6ec 100644
--- a/t/report/status.t
+++ b/t/report/status.t
@@ -33,4 +33,5 @@ diag "link IR to Inc after create" if $ENV{'TEST_VERBOSE'};
     is $agent->ticket_status($ir_id), 'open', 'auto open kicked in';
 }
 
+undef $agent;
 done_testing;
diff --git a/t/searches/cf.t b/t/searches/cf.t
index ebfb355..9975454 100644
--- a/t/searches/cf.t
+++ b/t/searches/cf.t
@@ -29,4 +29,5 @@ $m->content_contains( 'Spam Incident', 'has spam incident' );
 # we should only be finding Queue = 'Incidents' and CF.Classification = 'Spam'
 $m->content_lacks( 'Ham Incident', 'has not found the ham incident' );
 
+undef $m;
 done_testing;
diff --git a/t/searches/menu.t b/t/searches/menu.t
index 9a21bf9..b5c3177 100644
--- a/t/searches/menu.t
+++ b/t/searches/menu.t
@@ -227,4 +227,5 @@ for my $type ( 'incident', 'ir', 'investigation', 'block' ) {
     }
 }
 
+undef $m;
 done_testing;
diff --git a/t/searches/simple.t b/t/searches/simple.t
index 0fd7155..8aca638 100644
--- a/t/searches/simple.t
+++ b/t/searches/simple.t
@@ -32,4 +32,5 @@ my $agent = default_agent();
     is($agent->uri,$agent->rt_base_url."RTIR/Display.html?id=$ir_id","Directed to the Report Page");
 }
 
+undef $agent;
 done_testing;
diff --git a/t/tools/lookup.t b/t/tools/lookup.t
index 707bf1d..7f5e861 100644
--- a/t/tools/lookup.t
+++ b/t/tools/lookup.t
@@ -56,4 +56,5 @@ SKIP:{
 
 undef $agent;
 
+undef $agent;
 done_testing;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list