]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/www_listing.t
tests: move t/common.perl to PublicInbox::TestCommon
[public-inbox.git] / t / www_listing.t
index c9201213c12482056b48984b2ac39a8c9ffeb8b1..75698ee53c2ee744f37175d361aa28c6db5e32a7 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use Test::More;
 use PublicInbox::Spawn qw(which);
-require './t/common.perl';
+use PublicInbox::TestCommon;
 my @mods = qw(URI::Escape Plack::Builder Digest::SHA
                IO::Compress::Gzip IO::Uncompress::Gunzip HTTP::Tiny);
 foreach my $mod (@mods) {
@@ -33,7 +33,7 @@ like(PublicInbox::WwwListing::fingerprint($bare), qr/\A[a-f0-9]{40}\z/,
        'got fingerprint with non-empty repo');
 
 sub tiny_test {
-       my ($host, $port) = @_;
+       my ($json, $host, $port) = @_;
        my $http = HTTP::Tiny->new;
        my $res = $http->get("http://$host:$port/manifest.js.gz");
        is($res->{status}, 200, 'got manifest');
@@ -107,7 +107,7 @@ SKIP: {
        $td = start_script($cmd, $env, { 3 => $sock });
        $sock = undef;
 
-       tiny_test($host, $port);
+       tiny_test($json, $host, $port);
 
        skip 'skipping grok-pull integration test', 2 if !which('grok-pull');