[Bps-public-commit] r15564 - in sd/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Wed Aug 27 16:42:25 EDT 2008


Author: sartak
Date: Wed Aug 27 16:42:23 2008
New Revision: 15564

Modified:
   sd/trunk/   (props changed)
   sd/trunk/t/sd-rt-permission.t

Log:
 r70605 at onn:  sartak | 2008-08-27 16:42:17 -0400
 Failing tests to confirm that Prophet does screw up when merging to a foreign replica fails :(


Modified: sd/trunk/t/sd-rt-permission.t
==============================================================================
--- sd/trunk/t/sd-rt-permission.t	(original)
+++ sd/trunk/t/sd-rt-permission.t	Wed Aug 27 16:42:23 2008
@@ -21,7 +21,7 @@
     diag "export SD_REPO=".$ENV{'PROPHET_REPO'} ."\n";
 }
 
-use Prophet::Test tests => 11;
+use Prophet::Test tests => 15;
 use App::SD::Test;
 use RT::Client::REST;
 use RT::Client::REST::Ticket;
@@ -42,10 +42,11 @@
 diag("create a ticket as root, then try to pull it as someone who doesn't have the rights to see it");
 
 my $ticket = RT::Client::REST::Ticket->new(
-    rt      => $root,
-    queue   => 'General',
-    status  => 'new',
-    subject => 'Fly Man',
+    rt       => $root,
+    queue    => 'General',
+    status   => 'new',
+    subject  => 'Fly Man',
+    priority => 10,
 )->store(text => "Ticket Comment");
 my $ticket_id = $ticket->id;
 
@@ -103,3 +104,32 @@
     }
 };
 
+$ticket = RT::Client::REST::Ticket->new(
+    rt      => $root,
+    id      => $ticket_id,
+)->retrieve;
+
+is($ticket->priority, 10, "ticket not updated");
+
+diag("give write rights, try to push again");
+
+$alice->PrincipalObj->GrantRight(Right => 'ModifyTicket', Object => $queue);
+
+as_alice {
+    ($ret, $out, $err) = run_script('sd', ['push', '--to',  $sd_alice_url]);
+    ok($ret);
+    TODO: {
+        local $TODO = "Prophet thinks it already merged this changeset!";
+        like($out, qr/Merged one changeset/);
+    }
+};
+
+$ticket = RT::Client::REST::Ticket->new(
+    rt      => $root,
+    id      => $ticket_id,
+)->retrieve;
+
+TODO: {
+    local $TODO = "ticket is NOT updated!";
+    is($ticket->priority, 20, "ticket updated");
+}



More information about the Bps-public-commit mailing list