X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fwww_listing.t;h=e785ae9b0e443233dac55ce30c367a2322a9f565;hb=d62d98b9a7f502da65673f0b83a6d06312c060d9;hp=4fcb43ea7bf88eaec38025e3c53ddc9971fde117;hpb=a09f678d8254064af7ca6dcfb3c3f84b5ae37b51;p=public-inbox.git diff --git a/t/www_listing.t b/t/www_listing.t index 4fcb43ea..e785ae9b 100644 --- a/t/www_listing.t +++ b/t/www_listing.t @@ -31,7 +31,10 @@ like(PublicInbox::WwwListing::fingerprint($bare), qr/\A[a-f0-9]{40}\z/, sub tiny_test { my ($json, $host, $port) = @_; my $http = HTTP::Tiny->new; - my $res = $http->get("http://$host:$port/manifest.js.gz"); + my $res = $http->get("http://$host:$port/"); + is($res->{status}, 200, 'got HTML listing'); + like($res->{content}, qr!!si, 'listing looks like HTML'); + $res = $http->get("http://$host:$port/manifest.js.gz"); is($res->{status}, 200, 'got manifest'); my $tmp; IO::Uncompress::Gunzip::gunzip(\(delete $res->{content}) => \$tmp); @@ -72,6 +75,7 @@ SKIP: { my @clone = qw(git clone -q -s --bare); is(system(@clone, $bare->{git_dir}, $alt), 0, 'clone shared repo'); + system(qw(git init --bare -q), "$v2/all.git") == 0 or die; for my $i (0..2) { is(system(@clone, $alt, "$v2/git/$i.git"), 0, "clone epoch $i"); } @@ -84,6 +88,8 @@ SKIP: { ok(unlink("$bare->{git_dir}/description"), 'removed bare/description'); open $fh, '>', $cfgfile or die; print $fh <<"" or die; +[publicinbox] + wwwlisting = all [publicinbox "bare"] inboxdir = $bare->{git_dir} url = http://$host/bare