diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Say why an oversized readme leaves about empty
A readme past max-blob-size is never read, which left the about page
with an empty block and no word of why.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0303-robustness.sh | 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 15 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 848b03a..d2bf79f 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -755,4 +755,19 @@ test_expect_success SANITY 'a scan entry that cannot be searched is named in ful grep "Unable to stat .*scanperm/locked/objects: Permission denied" err ' +# A readme past max-blob-size is never read, so the about page says why it +# has nothing to show. +test_expect_success 'a readme past max-blob-size is reported on the about page' ' + test_seq 1 1000 >repos/rob/big-readme && + git -C repos/rob add big-readme && + git -C repos/rob commit -q -m "big readme" && + { + echo "max-blob-size=1" && + cat robrc && + echo "repo.readme=:big-readme" + } >bigreadmerc && + CGIT_CONFIG="$PWD/bigreadmerc" QUERY_STRING="url=rob/about/" cgit >tmp && + grep "The readme is larger than max-blob-size (1 KB)" tmp +' + test_done |
