about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-27 20:31:44 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-27 21:20:01 +0000
commit7b5ea579e6a9490a4a38958acac8e078d805eec7 (patch)
tree28e99dd0ee8c6740ed0f5aaf22837db31ca983cd /t
parenta966564fef08a4f25670778efbff139fbbf47c84 (diff)
downloadpublic-inbox-7b5ea579e6a9490a4a38958acac8e078d805eec7.tar.gz
This will require multiple client invocations, but should reduce
load on the server and make it easier for readers to only clone
the latest data.

Unfortunately, supporting a cloneurl file for externally-hosted
repos will be more difficult as we cannot easily know if the
clones use v1 or v2 repositories, or how many git partitions
they have.
Diffstat (limited to 't')
-rw-r--r--t/psgi_v2.t5
-rw-r--r--t/view.t1
2 files changed, 6 insertions, 0 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index 2a798d6f..9964b477 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -165,6 +165,11 @@ test_psgi(sub { $www->call(@_) }, sub {
         $res = $cb->(GET('/v2test/reuse@mid/t/'));
         $raw = $res->content;
         like($raw, qr/\b4\+ messages\b/, 'thread overview shown with /t/');
+
+        $res = $cb->(GET('/v2test/0/info/refs'));
+        is($res->code, 200, 'got info refs for dumb clones');
+        $res = $cb->(GET('/v2test/info/refs'));
+        is($res->code, 404, 'unpartitioned git URL fails');
 });
 
 done_testing();
diff --git a/t/view.t b/t/view.t
index 22f5c7e4..8ae42256 100644
--- a/t/view.t
+++ b/t/view.t
@@ -16,6 +16,7 @@ my $ctx = {
                 base_url => sub { 'http://example.com/' },
                 cloneurl => sub {[]},
                 nntp_url => sub {[]},
+                max_git_part => sub { undef },
                 description => sub { '' }),
 };
 $ctx->{-inbox}->{-primary_address} = 'test@example.com';