]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5550: simplify no matching line check
authorDenton Liu <liu.denton@gmail.com>
Thu, 26 Mar 2020 08:27:51 +0000 (04:27 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 17:56:40 +0000 (10:56 -0700)
In the 'did not use upload-pack service' test, we have a complicated
song-and-dance to ensure that there are no "/git-upload-pack" lines in
"$HTTPD_ROOT_PATH/access.log". Simplify this by just checking that grep
returns a non-zero exit code.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5550-http-fetch-dumb.sh

index b811d89cfd6df25fb2e42db6f05a69cf0b7a6c3b..bcde886b87ae199c41c87669e6be33051e500e07 100755 (executable)
@@ -248,9 +248,7 @@ test_expect_success 'fetch can handle previously-fetched .idx files' '
 '
 
 test_expect_success 'did not use upload-pack service' '
-       test_might_fail grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log >act &&
-       : >exp &&
-       test_cmp exp act
+       ! grep "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log"
 '
 
 test_expect_success 'git client shows text/plain errors' '