]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Test unlocking issues in unarchive
authorDon Armstrong <don@donarmstrong.com>
Fri, 20 Jul 2007 12:23:14 +0000 (05:23 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 20 Jul 2007 12:23:14 +0000 (05:23 -0700)
 * Fix failure to import writebug

Debbugs/Control.pm
t/06_mail_handling.t

index 008d6255f32ac944e5ffd220de28ebfac005da24..7cc1fc20c8b77b6b04e9e9bc3216cd2992abf2ad 100644 (file)
@@ -90,7 +90,7 @@ BEGIN{
 
 use Debbugs::Config qw(:config);
 use Debbugs::Common qw(:lock buglog make_list get_hashname);
-use Debbugs::Status qw(bug_archiveable :read :hook);
+use Debbugs::Status qw(bug_archiveable :read :hook writebug);
 use Debbugs::CGI qw(html_escape);
 use Debbugs::Log qw(:misc);
 
index 959b80208aea11b9d1d261459cdfbfe35444f20e..f83eabb9a84237e2e9fb7903ebc4ef1a919773e5 100644 (file)
@@ -1,7 +1,7 @@
 # -*- mode: cperl;-*-
 # $Id: 05_mail.t,v 1.1 2005/08/17 21:46:17 don Exp $
 
-use Test::More tests => 64;
+use Test::More tests => 66;
 
 use warnings;
 use strict;
@@ -246,3 +246,24 @@ EOF
      is_deeply($status->{$control_command->{status_key}},$control_command->{status_value},"bug 1 $command")
          or fail(Dumper($status));
 }
+
+# verify that archive/unarchive can then be modified afterwards
+
+send_message(to => 'control@bugs.something',
+            headers => [To   => 'control@bugs.something',
+                        From => 'foo@bugs.something',
+                        Subject => "Munging a bug with unarchivearchive",
+                       ],
+            body => <<'EOF') or fail 'message to control@bugs.something failed';
+archive 1
+unarchive 1
+submitter 1 bar@baz.com
+thanks
+EOF
+                                 ;
+$SD_SIZE_NOW = dirsize($sendmail_dir);
+ok($SD_SIZE_NOW-$SD_SIZE_PREV >= 1,'control@bugs.something messages appear to have been sent out properly');
+$SD_SIZE_PREV=$SD_SIZE_NOW;
+# now we need to check to make sure the control message was processed without errors
+ok(system('sh','-c','find '.$sendmail_dir.q( -type f | xargs grep -q "Subject: Processed: Munging a bug with unarchivearchive")) == 0,
+   'control@bugs.something'. "unarchive/archive message was parsed without errors");