Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Compare the small blob the plain page serves
The test took any page holding the word top, with no status checked.
The refusal half lives in t0204, so the fixture now says why its limit
is set so low.
| -rwxr-xr-x | tests/t0301-security.sh | 8 |
1 file changed, 6 insertions, 2 deletions
diff --git a/tests/t0301-security.sh b/tests/t0301-security.sh index 4d33832..a9dab52 100755 --- a/tests/t0301-security.sh +++ b/tests/t0301-security.sh @@ -11,6 +11,8 @@ test_description='Check security fixes and fork-specific behaviour' # Some cases below share one repository and one config, so the fixture # carries everything they need at once, readmes holding markup that must not # reach the page as markup and a subdirectory to sort ahead of the files. +# The blob limit is the lowest there is, 1 KB, so a small file shows that a +# blob under it is still served. test_expect_success 'set up security fixtures' ' mkrepo repos/sec 1 && ( @@ -45,8 +47,10 @@ test_expect_success 'a valid id= still renders the log' ' ' test_expect_success 'a small blob is still served' ' - cgit_rc seccgitrc "url=sec/plain/afile" >tmp && - grep -F top tmp + cgit_ok seccgitrc "url=sec/plain/afile" >tmp && + strip_headers <tmp >body && + echo top >expect && + test_cmp expect body ' # A readme is repository content, so with no about filter configured it has |
