fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-03-15 01:07 pm

[dw-free] Fix remaining failing tests.

[commit: http://hg.dwscoalition.org/dw-free/rev/3cd5dbffdd1b]

http://bugs.dwscoalition.org/show_bug.cgi?id=3564

Remove webreq.t -- obsoleted by routing. Add authors to expected output from
atom feeds. Don't try to handle blobcache in the usermover.

Patch by [personal profile] exor674.

Files modified:
  • bin/moveucluster.pl
  • cgi-bin/ljfeed.pl
  • t/feed-atom.t
  • t/webreq.t
--------------------------------------------------------------------------------
diff -r b7d0caa4dfb2 -r 3cd5dbffdd1b bin/moveucluster.pl
--- a/bin/moveucluster.pl	Tue Mar 15 18:31:28 2011 +0800
+++ b/bin/moveucluster.pl	Tue Mar 15 21:06:44 2011 +0800
@@ -686,6 +686,7 @@ sub moveUser {
                       "pendcomments" => 1,    # don't need to copy these
                       "active_user"  => 1,    # don't need to copy these
                       "random_user_set" => 1, # "
+                      "blobcache" => 1,       # No need to handle this, used for database migrations
                       );
 
     $skip_table{'inviterecv'} = 1 unless $u->is_person; # if not person, skip invites received
diff -r b7d0caa4dfb2 -r 3cd5dbffdd1b cgi-bin/ljfeed.pl
--- a/cgi-bin/ljfeed.pl	Tue Mar 15 18:31:28 2011 +0800
+++ b/cgi-bin/ljfeed.pl	Tue Mar 15 21:06:44 2011 +0800
@@ -495,7 +495,7 @@ sub create_view_atom
         # the journal entry isn't owned by the journal. (communities)
         if ( $opts->{single_entry} || ! $journalu->equals( $poster ) ) {
             my $author = XML::Atom::Person->new( Version => 1 );
-            $author->email( $poster->email_visible ) if $poster->email_visible;
+            $author->email( $poster->email_visible ) if $poster && $poster->email_visible;
             $author->name(  $poster->{name} );
             $entry->author( $author );
 
diff -r b7d0caa4dfb2 -r 3cd5dbffdd1b t/feed-atom.t
--- a/t/feed-atom.t	Tue Mar 15 18:31:28 2011 +0800
+++ b/t/feed-atom.t	Tue Mar 15 21:06:44 2011 +0800
@@ -57,11 +57,13 @@ my $e2 = $u->t_post_fake_entry;
         subject => $e2->subject_raw,
         text    => $e2->event_raw,
         time    => substr( $e2->eventtime_mysql, 0, -3 ),
+        author  => $u->name_raw,
     }, {
         link    => $e1->url,
         subject => $e1->subject_raw,
         text    => $e1->event_raw,
         time    => substr( $e1->eventtime_mysql, 0, -3 ),
+        author  => $u->name_raw,
     }], "Check entries from feed" );
 
 
@@ -78,6 +80,7 @@ my $e2 = $u->t_post_fake_entry;
         subject => $e2->subject_raw,
         text    => $e2->event_raw,
         time    => substr( $e2->eventtime_mysql, 0, -3 ),
+        author  => $u->name_raw,
     }, "Check individual entry from feed" );
 }
 
@@ -135,11 +138,13 @@ note( "No bot crawling" );
         subject => $e2->subject_raw,
         text    => $e2->event_raw,
         time    => substr( $e2->eventtime_mysql, 0, -3 ),
+        author  => $u->name_raw,
     }, {
         link    => $e1->url,
         subject => $e1->subject_raw,
         text    => $e1->event_raw,
         time    => substr( $e1->eventtime_mysql, 0, -3 ),
+        author  => $u->name_raw,
     }], "Check entries from feed" );
 }
 
diff -r b7d0caa4dfb2 -r 3cd5dbffdd1b t/webreq.t
--- a/t/webreq.t	Tue Mar 15 18:31:28 2011 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-# -*-perl-*-
-
-use strict;
-use Test::More;
-use lib "$ENV{LJHOME}/cgi-bin";
-
-#plan tests => ;
-plan skip_all => 'Fix this test!';
-
-require 'modperl.pl';
-use LJ::Test;
-
-
-
-my $fa = fake_apache();
-ok($fa, "got a fake apache");
-ok($LJ::DOMAIN_WEB, "got a web domain");
-diag($LJ::DOMAIN_WEB);
-
-my $req = $fa->new_request(
-                           uri => "/admin/healthy",
-                           headers => {
-                               host => $LJ::DOMAIN_WEB,
-                           },
-
-#                             uri => "/profile",
-#                             args => "mode=full",
-#                             headers => {
-#                                 host => "brad.lj.bradfitz.com",
-#                             },
-
-                           );
-ok($req, "got a request");
-
-$fa->run($req);
-
-ok(1);
--------------------------------------------------------------------------------