t5541: fix url scrubbing test when GPG is not set
[gitweb.git] / t / t5541-http-push-smart.sh
index 9cf27e8c9924770b619b8e21fb22b5225e5f085f..9593fc17f36650f8e02fdae1dafd1419d84f71f3 100755 (executable)
@@ -6,11 +6,6 @@
 test_description='test smart pushing over http via http-backend'
 . ./test-lib.sh
 
-if test -n "$NO_CURL"; then
-       skip_all='skipping test, git built without http support'
-       test_done
-fi
-
 ROOT_PATH="$PWD"
 . "$TEST_DIRECTORY"/lib-gpg.sh
 . "$TEST_DIRECTORY"/lib-httpd.sh
@@ -373,5 +368,14 @@ test_expect_success GPG 'push with post-receive to inspect certificate' '
        test_cmp expect "$HTTPD_DOCUMENT_ROOT_PATH/push-cert-status"
 '
 
+test_expect_success 'push status output scrubs password' '
+       cd "$ROOT_PATH/test_repo_clone" &&
+       git push --porcelain \
+               "$HTTPD_URL_USER_PASS/smart/test_repo.git" \
+               +HEAD:scrub >status &&
+       # should have been scrubbed down to vanilla URL
+       grep "^To $HTTPD_URL/smart/test_repo.git" status
+'
+
 stop_httpd
 test_done