From 3ce268d7d0e5d5a8b9c0cf92a7d53b4337218891 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 19 May 2016 18:56:17 -0500 Subject: [PATCH] test: remove httpd tests that ask for user Until we figure a way to pass the user correctly. Signed-off-by: Felipe Contreras --- t/t5540-http-push-webdav.sh | 11 --------- t/t5541-http-push-smart.sh | 45 ------------------------------------- t/t5550-http-fetch-dumb.sh | 12 ---------- t/t5551-http-fetch-smart.sh | 31 ------------------------- 4 files changed, 99 deletions(-) diff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh index 88ff5a49e4..97f3f51114 100755 --- a/t/t5540-http-push-webdav.sh +++ b/t/t5540-http-push-webdav.sh @@ -165,17 +165,6 @@ test_expect_failure 'user was prompted only once for password' ' expect_askpass pass user@host ' -test_expect_failure 'push to password-protected repository (no user in URL)' ' - test_commit pw-nouser && - set_askpass user@host pass@host && - git push "$HTTPD_URL/auth/dumb/test_repo.git" HEAD && - expect_askpass both user@host && - git rev-parse --verify HEAD >expect && - git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/test_repo.git" \ - rev-parse --verify HEAD >actual && - test_cmp expect actual -' - stop_httpd test_done diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index fd7d06b9a2..b5ca7ad38f 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -265,30 +265,6 @@ test_expect_success 'http push respects GIT_COMMITTER_* in reflog' ' test_cmp expect actual ' -test_expect_success 'push over smart http with auth' ' - cd "$ROOT_PATH/test_repo_clone" && - echo push-auth-test >expect && - test_commit push-auth-test && - set_askpass user@host pass@host && - git push "$HTTPD_URL"/auth/smart/test_repo.git && - git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git" \ - log -1 --format=%s >actual && - expect_askpass both user@host && - test_cmp expect actual -' - -test_expect_success 'push to auth-only-for-push repo' ' - cd "$ROOT_PATH/test_repo_clone" && - echo push-half-auth >expect && - test_commit push-half-auth && - set_askpass user@host pass@host && - git push "$HTTPD_URL"/auth-push/smart/test_repo.git && - git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git" \ - log -1 --format=%s >actual && - expect_askpass both user@host && - test_cmp expect actual -' - test_expect_success 'create repo without http.receivepack set' ' cd "$ROOT_PATH" && git init half-auth && @@ -307,27 +283,6 @@ test_expect_success 'clone via half-auth-complete does not need password' ' expect_askpass none ' -test_expect_success 'push into half-auth-complete requires password' ' - cd "$ROOT_PATH/half-auth-clone" && - echo two >expect && - test_commit two && - set_askpass user@host pass@host && - git push "$HTTPD_URL/half-auth-complete/smart/half-auth.git" && - git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/half-auth.git" \ - log -1 --format=%s >actual && - expect_askpass both user@host && - test_cmp expect actual -' - -test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' ' - sha1=$(git rev-parse HEAD) && - test_seq 2000 | - sort | - sed "s|.*|$sha1 refs/tags/really-long-tag-name-&|" \ - >.git/packed-refs && - run_with_limited_cmdline git push --mirror -' - test_expect_success GPG 'push with post-receive to inspect certificate' ' ( cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git && diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh index 64146352ae..4bf9ba57f4 100755 --- a/t/t5550-http-fetch-dumb.sh +++ b/t/t5550-http-fetch-dumb.sh @@ -42,12 +42,6 @@ test_expect_success 'create password-protected repository' ' setup_askpass_helper -test_expect_success 'cloning password-protected repository can fail' ' - set_askpass wrong && - test_must_fail git clone "$HTTPD_URL/auth/dumb/repo.git" clone-auth-fail && - expect_askpass both wrong -' - test_expect_success 'http auth can use user/pass in URL' ' set_askpass wrong && git clone "$HTTPD_URL_USER_PASS/auth/dumb/repo.git" clone-auth-none && @@ -60,12 +54,6 @@ test_expect_success 'http auth can use just user in URL' ' expect_askpass pass user@host ' -test_expect_success 'http auth can request both user and pass' ' - set_askpass user@host pass@host && - git clone "$HTTPD_URL/auth/dumb/repo.git" clone-auth-both && - expect_askpass both user@host -' - test_expect_success 'http auth respects credential helper config' ' test_config_global credential.helper "!f() { cat >/dev/null diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index 58207d8825..579e4a0db9 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -110,15 +110,6 @@ test_expect_success 'redirects re-root further requests' ' git clone $HTTPD_URL/smart-redir-limited/repo.git repo-redir-limited ' -test_expect_success 'clone from password-protected repository' ' - echo two >expect && - set_askpass user@host pass@host && - git clone --bare "$HTTPD_URL/auth/smart/repo.git" smart-auth && - expect_askpass both user@host && - git --git-dir=smart-auth log -1 --format=%s >actual && - test_cmp expect actual -' - test_expect_success 'clone from auth-only-for-push repository' ' echo two >expect && set_askpass wrong && @@ -128,28 +119,6 @@ test_expect_success 'clone from auth-only-for-push repository' ' test_cmp expect actual ' -test_expect_success 'clone from auth-only-for-objects repository' ' - echo two >expect && - set_askpass user@host pass@host && - git clone --bare "$HTTPD_URL/auth-fetch/smart/repo.git" half-auth && - expect_askpass both user@host && - git --git-dir=half-auth log -1 --format=%s >actual && - test_cmp expect actual -' - -test_expect_success 'no-op half-auth fetch does not require a password' ' - set_askpass wrong && - git --git-dir=half-auth fetch && - expect_askpass none -' - -test_expect_success 'redirects send auth to new location' ' - set_askpass user@host pass@host && - git -c credential.useHttpPath=true \ - clone $HTTPD_URL/smart-redir-auth/repo.git repo-redir-auth && - expect_askpass both user@host auth/smart/repo.git -' - test_expect_success 'disable dumb http on server' ' git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \ config http.getanyfile false -- 2.32.0.93.g670b81a890