[Rt-commit] r12881 - in rt/branches/3.8-TESTING: .

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Jun 4 15:26:18 EDT 2008


Author: alexmv
Date: Wed Jun  4 15:25:37 2008
New Revision: 12881

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/t/shredder/00skeleton.t
   rt/branches/3.8-TESTING/t/shredder/01basics.t
   rt/branches/3.8-TESTING/t/shredder/01ticket.t
   rt/branches/3.8-TESTING/t/shredder/02group_member.t
   rt/branches/3.8-TESTING/t/shredder/02queue.t
   rt/branches/3.8-TESTING/t/shredder/02template.t
   rt/branches/3.8-TESTING/t/shredder/02user.t
   rt/branches/3.8-TESTING/t/shredder/03plugin_tickets.t
   rt/branches/3.8-TESTING/t/shredder/utils.pl

Log:
 r32518 at kohr-ah:  chmrr | 2008-06-04 15:23:45 -0400
  * Less shredder test boilerplate


Modified: rt/branches/3.8-TESTING/t/shredder/00skeleton.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/00skeleton.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/00skeleton.t	Wed Jun  4 15:25:37 2008
@@ -18,10 +18,3 @@
 #
 
 cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}
-

Modified: rt/branches/3.8-TESTING/t/shredder/01basics.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/01basics.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/01basics.t	Wed Jun  4 15:25:37 2008
@@ -25,9 +25,3 @@
 $shredder->Wipeout( Object => $ticket );
 
 cmp_deeply( dump_current_and_savepoint(), "current DB equal to savepoint");
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}

Modified: rt/branches/3.8-TESTING/t/shredder/01ticket.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/01ticket.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/01ticket.t	Wed Jun  4 15:25:37 2008
@@ -78,10 +78,3 @@
     $shredder->WipeoutAll;
 }
 cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}
-

Modified: rt/branches/3.8-TESTING/t/shredder/02group_member.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/02group_member.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/02group_member.t	Wed Jun  4 15:25:37 2008
@@ -96,10 +96,3 @@
 	is( $ticket->Owner, $RT::Nobody->id, "owner switched back to nobody" );
 	is( $ticket->OwnerGroup->MembersObj->First->MemberId, $RT::Nobody->id, "and owner role group member is nobody");
 }
-
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}

Modified: rt/branches/3.8-TESTING/t/shredder/02queue.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/02queue.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/02queue.t	Wed Jun  4 15:25:37 2008
@@ -118,10 +118,3 @@
 #	$shredder->WipeoutAll;
 #	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
 }
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}
-

Modified: rt/branches/3.8-TESTING/t/shredder/02template.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/02template.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/02template.t	Wed Jun  4 15:25:37 2008
@@ -69,10 +69,3 @@
 	$shredder->WipeoutAll;
 	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
 }
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}
-

Modified: rt/branches/3.8-TESTING/t/shredder/02user.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/02user.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/02user.t	Wed Jun  4 15:25:37 2008
@@ -55,10 +55,3 @@
     ok($@, "wipeout throw exception if no resolvers");
     cmp_deeply( dump_current_and_savepoint('aucreate'), "current DB equal to savepoint");
 }
-
-if( is_all_successful() ) {
-	cleanup_tmp();
-} else {
-	diag( note_on_fail() );
-}
-

Modified: rt/branches/3.8-TESTING/t/shredder/03plugin_tickets.t
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/03plugin_tickets.t	(original)
+++ rt/branches/3.8-TESTING/t/shredder/03plugin_tickets.t	Wed Jun  4 15:25:37 2008
@@ -143,4 +143,3 @@
     $shredder->WipeoutAll;
 }
 cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
-

Modified: rt/branches/3.8-TESTING/t/shredder/utils.pl
==============================================================================
--- rt/branches/3.8-TESTING/t/shredder/utils.pl	(original)
+++ rt/branches/3.8-TESTING/t/shredder/utils.pl	Wed Jun  4 15:25:37 2008
@@ -402,8 +402,12 @@
 }
 
 END {
-    return unless is_all_successful;
-    File::Path::rmtree(tmpdir());
+    return unless -e tmpdir();
+    if( is_all_successful() ) {
+            cleanup_tmp();
+    } else {
+            diag( note_on_fail() );
+    }
 }
 
 1;


More information about the Rt-commit mailing list