about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-23 17:42:05 +0000
committerEric Wong <e@80x24.org>2019-06-23 17:42:29 +0000
commitf4f0a3be0864721d90f9557ffe1c513b0289a74b (patch)
tree732e85a08b896f00405a90579146ee645eb33673 /t
parent74dc166d18b5586689f21f6032196279e6db4db3 (diff)
downloadpublic-inbox-f4f0a3be0864721d90f9557ffe1c513b0289a74b.tar.gz
manifest: v2 epoch descriptions based on inbox->description
The default $GIT_DIR/description (provided by git.git templates)
isn't very useful for v2 epochs, so use the inbox description
and suffix it with the epoch number if it's otherwise unnamed.

Requested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
  https://public-inbox.org/meta/20190620190017.GA27175@chatter.i7.local/
Diffstat (limited to 't')
-rw-r--r--t/www_listing.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/www_listing.t b/t/www_listing.t
index d82a4a4a..e5b797db 100644
--- a/t/www_listing.t
+++ b/t/www_listing.t
@@ -55,7 +55,12 @@ sub tiny_test {
                 $res->{headers}->{'last-modified'},
                 'modified field and Last-Modified header match');
 
-        ok($manifest->{'/v2/git/0.git'}, 'v2 epoch appeared');
+        ok(my $v2epoch0 = $manifest->{'/v2/git/0.git'}, 'v2 epoch 0 appeared');
+        like($v2epoch0->{description}, qr/ \[epoch 0\]\z/,
+                'epoch 0 in description');
+        ok(my $v2epoch1 = $manifest->{'/v2/git/1.git'}, 'v2 epoch 1 appeared');
+        like($v2epoch1->{description}, qr/ \[epoch 1\]\z/,
+                'epoch 1 in description');
 }
 
 my $pid;