about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/psgi_v2.t2
-rw-r--r--t/v2mirror.t8
-rw-r--r--t/www_listing.t6
3 files changed, 10 insertions, 6 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index 98112494..5c358cde 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -202,6 +202,8 @@ test_psgi(sub { $www->call(@_) }, sub {
 
         $res = $cb->(GET('/v2test/0/info/refs'));
         is($res->code, 200, 'got info refs for dumb clones');
+        $res = $cb->(GET('/v2test/0.git/info/refs'));
+        is($res->code, 200, 'got info refs for dumb clones w/ .git suffix');
         $res = $cb->(GET('/v2test/info/refs'));
         is($res->code, 404, 'unpartitioned git URL fails');
 
diff --git a/t/v2mirror.t b/t/v2mirror.t
index fe05ec4d..c31dcd5b 100644
--- a/t/v2mirror.t
+++ b/t/v2mirror.t
@@ -80,11 +80,13 @@ $sock = undef;
 
 my @cmd;
 foreach my $i (0..$epoch_max) {
-        @cmd = (qw(git clone --mirror -q), "http://$host:$port/v2/$i",
+        my $sfx = $i == 0 ? '.git' : '';
+        @cmd = (qw(git clone --mirror -q),
+                "http://$host:$port/v2/$i$sfx",
                 "$tmpdir/m/git/$i.git");
 
-        is(system(@cmd), 0, 'cloned OK');
-        ok(-d "$tmpdir/m/git/$i.git", 'mirror OK');
+        is(system(@cmd), 0, "cloned $i.git");
+        ok(-d "$tmpdir/m/git/$i.git", "mirror $i OK");
 }
 
 @cmd = ("$script-init", '-V2', 'm', "$tmpdir/m", 'http://example.com/m',
diff --git a/t/www_listing.t b/t/www_listing.t
index 546c2f8f..2741e1b8 100644
--- a/t/www_listing.t
+++ b/t/www_listing.t
@@ -111,7 +111,7 @@ SKIP: {
         is(HTTP::Date::time2str($bare->{modified}), $h{'Last-Modified'},
                 'modified field and Last-Modified header match');
 
-        ok($manifest->{'/v2/0'}, 'v2 epoch appeared');
+        ok($manifest->{'/v2/git/0.git'}, 'v2 epoch appeared');
 
         skip 'skipping grok-pull integration test', 2 if !which('grok-pull');
 
@@ -130,7 +130,7 @@ mymanifest = $tmpdir/local-manifest.js.gz
 
         system(qw(grok-pull -c), "$tmpdir/repos.conf");
         is($? >> 8, 127, 'grok-pull exit code as expected');
-        for (qw(alt bare v2/0 v2/1 v2/2)) {
+        for (qw(alt bare v2/git/0.git v2/git/1.git v2/git/2.git)) {
                 ok(-d "$tmpdir/mirror/$_", "grok-pull created $_");
         }
 
@@ -150,7 +150,7 @@ mymanifest = $tmpdir/per-inbox-manifest.js.gz
         ok(mkdir("$tmpdir/per-inbox"), 'prepare single-v2-inbox mirror');
         system(qw(grok-pull -c), "$tmpdir/per-inbox.conf");
         is($? >> 8, 127, 'grok-pull exit code as expected');
-        for (qw(v2/0 v2/1 v2/2)) {
+        for (qw(v2/git/0.git v2/git/1.git v2/git/2.git)) {
                 ok(-d "$tmpdir/per-inbox/$_", "grok-pull created $_");
         }
 }